Re: DOW is 0-based? - Mailing list pgsql-general

From Igor Korot
Subject Re: DOW is 0-based?
Date
Msg-id CA+FnnTwOSPyAK6vSopLFEhYx-gx0HgfP5UUNJ5+1RU9-FxYnyw@mail.gmail.com
Whole thread Raw
In response to DOW is 0-based?  ("Igal @ Lucee.org" <igal@lucee.org>)
List pgsql-general
Hi,

On Thu, Feb 8, 2018 at 2:24 PM, Igal @ Lucee.org <igal@lucee.org> wrote:
> Is there a rational reason why Day of the Week is 0-based, i.e. Sunday (0)
> to Saturday (6) instead of the more intuitive Sunday (1) to Saturday (7)?
>
>     SELECT date_part('dow', current_date);
>
> https://www.postgresql.org/docs/current/static/functions-datetime.html

https://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week

Thank you.

>
> Thanks,
>
> Igal Sapir
> Lucee Core Developer
> Lucee.org


pgsql-general by date:

Previous
From: "Igal @ Lucee.org"
Date:
Subject: DOW is 0-based?
Next
From: Steven Hirsch
Date:
Subject: Re: Odd behavior with 'currval'