date diff calc

Tim Peters tim.peters at gmail.com
Mon Nov 29 22:12:26 EST 2004


[Skip Montanaro]
> ...
> The datetime.date object already exposes a strftime method for
> generating a formatted string output and will create date objects
> from both time.time() output (fromtimestamp) and "proleptic
> Gregorian ordinal"s (fromordinal).  Looking at the datetime module
> docs, it's not at all obvious to me that the latter would be used all
> that often.

Then the part of the docs you're overlooking is the part explaining
that "Calendrical Calculations" bases all its calendar conversions on
proleptic Gregorian ordinals.  They're for people who want something
other than the Gregorian calendar, and want it enough to write some
code.

> I think inputs from strings would be much more common.

Me too, although it's a bottomless pit.

guess-6-intended-meanings-for-1/2/3-before-breakfast-ly y'rs



More information about the Python-list mailing list