
Dates That Don't Exist - woodruffw
https://blog.yossarian.net/2015/06/09/Dates-That-Dont-Exist
======
eesmith
That is, the demonstrated behavior of Python is exactly what the documentation
claims will happen.

I believe the author is misrepresenting the documentation by writing:

> Python's datetime module, despite claiming to represent a date object in
> "the current Gregorian calendar," sadly does not do so:

This is an incomplete quote from the Python documentation. The full context is
(emphasis mine):

> A date object represents a date (year, month and day) in an idealized
> calendar, the current Gregorian calendar _indefinitely extended in both
> directions._

The Python documentation in the same paragraph says:

> This matches the definition of the “proleptic Gregorian” calendar in
> Dershowitz and Reingold’s book Calendrical Calculations, where it’s the base
> calendar for all computations.

Elsewhere it says that the datetime represents: "An idealized naive date,
assuming the current Gregorian calendar always was, and always will be, in
effect."

P.S. The article is dated (2015).

