[Python-ideas] Pythonic Dates, Times, and Deltas
Daniel G. Taylor
dan at programmer-art.org
Thu Oct 14 20:54:30 CEST 2010
On 10/13/2010 06:16 PM, Dag Odenhall wrote:
> Not convinced your library is very Pythonic. Why a tuple attribute
> instead of having date objects be iterable so you can do tuple(Date())?
How do you envision this working for days, weeks, months, years? E.g.
getting the min/max Date objects for today, for next week, for this
current month, etc.
I'm very open to ideas here; I just implemented what made sense to me at
the time.
> How does the fancy formats deal with locales?
It internally uses datetime.strftime, so will behave however that
behaves with regard to locales.
> Is there support for ISO 8601? Should probably be the __str__.
Not built-in other than supporting a strftime method. This is a good
idea and I will probably add it.
> +1 on the general idea, though.
Thanks :-)
Take care,
--
Daniel G. Taylor
http://programmer-art.org/
More information about the Python-ideas
mailing list