This package provides a DateTime data type, as known from Zope. Unless you need to communicate with Zope APIs, you're probably better off using Python's built-in datetime module.
Something I often need is to convert a DateTime object to a date. This is pretty easy with the lowercase datetime class (just convert to datetime.date). With DateTime, I set the time to 00:00:00, but that's it's a bit complicated if it's meant to be timezone-safe (without changing the timezone).
I think this is a dumb idea (apart from the code not working). As it's a time, the date can still vary from timezone to timezone, especially if its 0:00.
Something I often need is to convert a DateTime object to a date. This is pretty easy with the lowercase datetime class (just convert to datetime.date). With DateTime, I set the time to 00:00:00, but that's it's a bit complicated if it's meant to be timezone-safe (without changing the timezone).
Here's what I've been coming up with:
What do you think about adding a new method date or toDate to the class? (and maybe also a method today)
I would be willing to provide a PR :)