Re: Find all the dates in the calendar week? - Mailing list pgsql-general

From Thomas Lockhart
Subject Re: Find all the dates in the calendar week?
Date
Msg-id 39649935.6CE3056A@alumni.caltech.edu
Whole thread Raw
In response to Find all the dates in the calendar week?  (Stephane Bortzmeyer <bortzmeyer@pasteur.fr>)
Responses Re: Find all the dates in the calendar week?  (Karel Zak <zakkr@zf.jcu.cz>)
Re: Find all the dates in the calendar week?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
>  yes, my current to_char() is almost compatible with oracle, but I need
> last two features --- IYYY (ISO-year) and IW (ISO-week). But I not explore
> it exactly yet. I mean that current (PG's) week-of-year is like ISO or not?

Yes. 'week' is "ISO week" (new for 7.0 afaicr). And it wasn't *entirely*
trivial to implement, so you may want to steal code for to_char() ;)

I just didn't implement the corresponding "year" code at least partly
because I wasn't sure what to call it. 'iyear' seems like a pretty good
choice, or should it be 'isoyear'? 'year' is already used, obviously,
and if 'iyear' is chosen then perhaps I should change 'week' to 'iweek'
for consistancy. Comments?

                     - Thomas

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL & the BSD License
Next
From: Karel Zak
Date:
Subject: Re: Find all the dates in the calendar week?