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 39668949.EF29A518@alumni.caltech.edu
Whole thread Raw
In response to Re: Find all the dates in the calendar week?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Find all the dates in the calendar week?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
> > 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?
> Then we should probably rather change 'year' to something else. Standards
> should be preferred.

"Standards" in this case include common usage and the ISO-defined
business usage of business-year/week-of-year. If we had to choose,
clearly common usage wins.

> Out of curiosity, what's the difference between
> ISO-year and proprietary-year? I can see the week-of-year thing, but the
> year of a year is always constant, no?

ISO-year/week-of-year is a business-only construct, perhaps helping with
payment intervals. There is some slop in the beginning and end of each
calendar year, which can result in a particular day in a calendar year
fitting into a different ISO-year (not the right term btw).

> Btw., isn't there an SQL EXTRACT function for all of this? Shouldn't we be
> thinking in terms of that?

EXTRACT() is implemented with date_part().

                 - Thomas

pgsql-general by date:

Previous
From: Philip Warner
Date:
Subject: Re: PostgreSQL & the BSD License
Next
From: Adrian Phillips
Date:
Subject: Re: Anyone using ReiserFS in production work? (or advise against it?)