Datetime utility functions
Paul Moore
pf_moore at yahoo.co.uk
Tue Sep 16 15:32:35 EDT 2003
Carel Fellinger <carel.fellinger at chello.nl> writes:
> On Tue, Sep 16, 2003 at 05:19:50PM +0300, Christos TZOTZIOY Georgiou wrote:
> ...
>> I sent my own version without having seen your own --and mine might seem
>> obfuscated, compared to yours.
>
> you both use the same indirect way of getting to the end of the month.
> why not do what datetime.c does, like:
Mainly because that seems even more like reinventing the wheel.
Writing code that already exists is something I dislike doing at the
best of times. Writing *tricky* code that already exists feels even
more unpleasant. (Yes, I know the leap year calculation isn't that
hard - but lots of people have got it wrong in the past...)
I guess that's my real issue. I know the datetime module already has
this information. But persuading it to tell me requires me to jump
through hoops, whereas reimplementing it feels like admitting defeat.
None of it's hard, though. I've spent more time on emails about the
issue than I'd ever need to spend in implementing anything :-)
Paul.
--
This signature intentionally left blank
More information about the Python-list
mailing list