Re: AW: Re: Week number
От | Karel Zak |
---|---|
Тема | Re: AW: Re: Week number |
Дата | |
Msg-id | 20010315105810.A28603@ara.zf.jcu.cz обсуждение исходный текст |
Ответ на | Re: AW: Re: Week number (Roland Roberts <roland@astrofoto.org>) |
Список | pgsql-hackers |
On Wed, Mar 14, 2001 at 01:23:30PM -0500, Roland Roberts wrote: > >>>>> "AZ" == Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes: > > >> Unix day-of-week starts on Sunday, not Monday, which is what > >> date_trunc('dow',...) returns. Presumably this is modeled on > >> the traditional notion (at least in the US; I suspect this is > >> true in most European countries at least) of Sunday being "the > >> first day of week". > > AZ> Germany and Austria have Monday as first day of week, I think > AZ> most of Europe also. > > I believe the goal was to have a to_char() that was complete and > Oracle-compatible. Perhaps we need to also have a trunc() which is Yes, an Oracle-compatiblity is important for masks (format pictures) used in both (Ora and PG). But our PG's implementation has some extensions, for example 'ID' ISO-day-of-week in 7.2 where Monday = first day of week. I hope all countries will glad :-) for 'WW' and 'D' are results same: Ora: SVRMGR> select to_char( to_date('2001/03/12', 'YYYY/MM/DD'), 'WW Day D YYYY/MM/DD') from dual; TO_CHAR(TO_DATE('2001/03/ ------------------------- 11 Monday 2 2001/03/12 1 row selected. PG: select to_char( to_date('2001/03/12', 'YYYY/MM/DD'), 'WW Day D YYYY/MM/DD'); to_char ---------------------------11 Monday 2 2001/03/12 (1 row) Karel -- Karel Zak <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
В списке pgsql-hackers по дате отправления: