[Python-Dev] Status of Python Date/Time proposal?

Tim Peters tim@zope.com
Thu, 28 Mar 2002 18:46:40 -0500


[Guido]
> ...
> - There are a bunch of methods and constructors that I don't think are
>   very useful.  (E.g. the fromordinal() constructors are unused.)

One of the requirements on the Wiki is "easy" conversion to/from other
calendar systems.  The to-and-from ordinal methods are the only thing we
have arguably addressing the requirement (and "Calendrical Calculations"
uses the very same proleptic Gregorian ordinals as its canonical form, so at
least for readers of that book these are the most useful things to expose).
If you have no need to convert among other calendar systems, then of course
you're not going to use them.

If we took the requirement seriously, I expect it would be better to expose
the underlying ord2ymd and ymd2ord functions (which, unlike Dates, aren't
restricted to the years 1-9999).