Re: Find all the dates in the calendar week?

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: Find all the dates in the calendar week?
Дата
Msg-id 39668949.EF29A518@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: Find all the dates in the calendar week?  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Find all the dates in the calendar week?  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: PostgreSQL & the BSD License
Следующее
От: Adrian Phillips
Дата:
Сообщение: Re: Anyone using ReiserFS in production work? (or advise against it?)