Re: day of week

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Don Baccus <dhogaza(at)pacifier(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: day of week
Date: 2000-06-07 16:35:49
Message-ID: Pine.LNX.4.21.0006070048130.3158-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Karel Zak writes:

> The Oracle always directly set first week on Jan-01, but day-of-week count
> correct... It is pretty dirty, but it is a probably set in libc's mktime().

The first week of the year is most certainly not (always) the week with
Jan-01 in it. My understanding is that it's the first week where the
Thursday is in the new year, but I might be mistaken. Here in Sweden much
of the calendaring is done based on the week of the year concept, so I'm
pretty sure that there's some sort of standard on this. And sure enough,
this year started on a Saturday, but according to the calendars that hang
around here the first week of the year started on the 3rd of January.

> Well, we will in PG both version:
>
> oracle's to_char:
> * week-start is a sunday
> * first week start on Jan-01, but day-of-week is count continual
>
> PG date_part/trunc:
> * week-start in monday
> * first week is a first full week in new year (really?)

The worst thing we could do is having an inconsistency here. Having a
configuration option or two that applies to both sounds better.

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-06-07 16:45:09 Re: Look at heap_beginscan()
Previous Message Peter Eisentraut 2000-06-07 16:30:42 Re: Protection of debugging options