Re: date_trunct() and start of week

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: date_trunct() and start of week
Дата
Msg-id 27291.1259335240@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: date_trunct() and start of week  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
Thomas Kellerer <spam_eater@gmx.net> writes:
> I'm just curious which setting defines whether monday or sunday is considered the "first day in a week"

A look at the source code (timestamptz_trunc) shows that truncation to
week start follows the ISO week conventions --- so weeks start on
Monday, regardless of locale.

Offhand I do not think that we pay attention to locale for any datetime
calculations.  However, there are other places that use Sunday for week
start, so it does matter which calculation you ask for ...

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: "Shakil Shaikh"
Дата:
Сообщение: Re: Invalid redo in checkpoint record
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: READ ONLY & I/O ERROR