datetime.timedelta replacement
Project description
Install
$ [sudo] pip install timedelta
Features
- total seconds, minutes, hours, days, weeks, months, years
Examples
>>> from timedelta import Timedelta
>>> td = Timedelta(days=2, hours=2)
# init from datetime.timedelta
>>> td = Timedelta(datetime1 - datetime2)
total
seconds, minutes, hours, days, weeks, months, years
>>> td = Timedelta(days=2, hours=2)
>>> td.total.seconds
180000
>>> td.total.minutes
3000
>>> td.total.hours
50
>>> td.total.days
2
Sources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
timedelta-0.0.1.tar.gz
(1.4 kB
view hashes)