pep proposal : A date object for the standard library

phil hunt philh at comuno.freeserve.co.uk
Fri Dec 7 00:41:19 CET 2001


On 6 Dec 2001 03:46:44 -0800, sebastien <s.keim at laposte.net> wrote:
>
>In this format, the integer part correspond to the number of elapsed
>days since the start of the day 1858-11-17 CE. Negatives numbers are
>allowed for date before 1858-11-17.

Any reason why that day particularly?

> The decimal component is the
>fraction of the day corresponding to hour minutes and seconds,
>expressed in GMT.

Perhpas it'd be better to have se seconds as a separate integer, for
accuracy of arithmetic.

>This format has the following advantages:
>  - date arithmetic is easy (number of days between two dates is
>trivial, the  day of week need only to compute a modulo 7 ..)

True


-- 
*** Philip Hunt *** philh at comuno.freeserve.co.uk ***




More information about the Python-list mailing list