DOW is 0-based?

From: "Igal (at) Lucee(dot)org" <igal(at)lucee(dot)org>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: DOW is 0-based?
Date: 2018-02-08 20:24:54
Message-ID: 860b4e3a-b157-8a70-8a5b-deb4a61e1494@lucee.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Thanks,

Igal Sapir
Lucee Core Developer
Lucee.org <http://lucee.org/>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2018-02-08 20:57:37 Re: DOW is 0-based?
Previous Message David G. Johnston 2018-02-08 19:55:20 Re: Odd behavior with 'currval'