Search Postgresql Archives

Re: date_trunct() and start of week

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Kellerer <spam_eater@xxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux