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@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden