On Wed, Apr 18, 2012 at 4:14 PM, Tom Lane <[email protected]> wrote: > "Kevin Grittner" <[email protected]> writes: >> I guess the point is that for hundreds of years, the same day could >> have a different date depending which country's calendar you were >> looking at. I'm not entirely clear why there's a problem if you >> pick the Gregorian calendar and apply it retroactively. > > Which is, in fact, exactly what our code does. I think that bit in the > docs is trying to explain why we do that rather than try to get the > code to reflect what people really used back then.
What I find a bit confusing is that this part talks about the Julian calendar, but elsewhere: <para> The SQL standard states that <quote>Within the definition of a <quote>datetime literal</quote>, the <quote>datetime value</quote>s are constrained by the natural rules for dates and times according to the Gregorian calendar</quote>. Dates between 1582-10-05 and 1582-10-14, although eliminated in some countries by Papal fiat, conform to <quote>natural rules</quote> and are hence valid dates. <productname>PostgreSQL</> follows the SQL standard's lead by counting dates exclusively in the Gregorian calendar, even for years before that calendar was in use. </para> So which calendar are we using, Julian or Gregorian? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs
