[Python-Dev] Issue5434: datetime.monthdelta
Paul Moore
p.f.moore at gmail.com
Thu Apr 16 20:42:00 CEST 2009
2009/4/16 Ned Deily <nad at acm.org>:
> In article
> <b8ad139e0904152318p5473cbe5yb5f55a19894cc834 at mail.gmail.com>,
> Jess Austin <jess.austin at gmail.com> wrote:
>> I'm new to python core development, and I've been advised to write to
>> python-dev concerning a feature/patch I've placed at
>> http://bugs.python.org/issue5434, with Rietveld at
>> http://codereview.appspot.com/25079.
>
> Without having looked at the code, I wonder whether you've looked at
> python-dateutil. I believe its relativedelta type does what you
> propose, plus much more, and it has the advantage of being widely used
> and tested.
The key thing missing (I believe) from dateutil is any equivalent of monthmod.
Hmm, it might be possible via relativedelta(d1,d2), but it's not clear
to me from the documentation precisely what attributes/methods of a
relativedelta object are valid for getting data *out* of it.
I do agree, though, that any proposal to extend the Python datetime
module should at least be informed by the design of the dateutil
module.
Paul.
More information about the Python-Dev
mailing list