Re: year and weeknumbers (proposal included)
От | Joost Helberg |
---|---|
Тема | Re: year and weeknumbers (proposal included) |
Дата | |
Msg-id | 20030130201456.9735215F8FC8@intern.snow.nl обсуждение исходный текст |
Ответ на | Re: year and weeknumbers (proposal included) (Hans-Jürgen Schönig <postgres@cybertec.at>) |
Список | pgsql-bugs |
Hans, Just like to_char( date, 'IW' ) refers to ISO Week, I'd like to see a IYYYY for ISO-year, and I wondered whether anyone else was interested, or whether I was missing then point. (IYYYY matches %G in Unix strftime). I know `week' has different meanings in various cultures, there's even weeks of 6 days (well, long ago)! But there's only one ISO definition for week. regards, Joost >>>>> "Hans" writes: > Date: Thu, 30 Jan 2003 15:15:14 +0100 > From: Hans-Jürgen Schönig <postgres@cybertec.at> >To: joost@snow.nl, pgsql-bugs@postgresql.org > Subject: Re: [BUGS] year and weeknumbers (proposal included) > Hi, > Counting weeks is a very special things because it is not the same in > all countries. As far as I have been toldPolish people count weeks not > the way Austrians do it. > On my calendar it says that the first week of the year starts on January > 1st. As far as I remember other countriessuch as Poland start to when > the first full week starts. > Maybe we should verify and document this somewhere. > Regards, > Hans > joost@snow.nl wrote: >> hi, >> >> last year (2002) the date december 31st is in week 1 of 2003. >> >> it is not possible to get thisout of a date-column using EXTRACT or >> to_char. >> to_char( '2002-12-31', 'WW' ) returns 1, and >> to_char('2002-12-31', 'YYYY' ) returns 2002 (as expected)! >> >> the format for retrieving the year with respect toweek-numbering >> could be something like IY, IYY, IYYY, IYYYY. >> >> to_char( '2002-12-31', 'IYYYY' ) returns2003. >> >> regards, >> >> Joost Helberg >> >> > -- > *Cybertec Geschwinde u Schoenig* > Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria > Tel: +43/1/913 68 09;+43/664/233 90 75 > www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at > <http://cluster.postgresql.at>,www.cybertec.at > <http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at> > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at oncewith the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- Joost Helberg Technisch Directeur Snow BV http://snow.nl Tel 0418-653333 Fax 0418-653666 Voorzitter VOSN http://www.vosn.nl Tel 0418-653336 Fax 0418-653666 GPG PblKey fprnt= 738C 20AC A545 02AE 6F5D 5A9F D724 EB4B 2B10 150B
В списке pgsql-bugs по дате отправления: