Message51905
I'm proposing some small enhancements to the datetime module:
Add a totimestamp() method to datetime.datetime that returns the seconds since 1/1/1970 00:00:00. The datetime class has already a fromtimestamp() factory but is missing a totimestamp() method.
Add a __int__() and __float__() method to datetime.timedelta which return the seconds (seconds + 86400 * days) as int and seconds + miliseconds as float. It would save some typing if somebody needs an integer representation of a timedelta object :]
The datetime module is implemented in C. I've never written a Python C extension so I can't help with a patch.
Thx |
|
Date |
User |
Action |
Args |
2007-08-23 15:56:38 | admin | link | issue1665292 messages |
2007-08-23 15:56:38 | admin | create | |
|