Skip to main content

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


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.0.tar.gz (1.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page