Re: day of week
От | Karel Zak |
---|---|
Тема | Re: day of week |
Дата | |
Msg-id | Pine.LNX.3.96.1000607185035.3467K-100000@ara.zf.jcu.cz обсуждение исходный текст |
Ответ на | Re: day of week (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
On Wed, 7 Jun 2000, Peter Eisentraut wrote: > 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. You probably right. I belive that Thomas say more about it... > > > > 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. Yes, but Oracle "porters" need probably oracle pseudo calculation.. For PG date_part/trunc will SET (or anything like this) good. Karel
В списке pgsql-hackers по дате отправления: