pep proposal : A date object for the standard library

phil hunt philh at
Thu Dec 6 18:41:19 EST 2001

On 6 Dec 2001 03:46:44 -0800, sebastien <s.keim at> 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 ..)


*** Philip Hunt *** philh at ***

More information about the Python-list mailing list