Skip to main content

datetime.timedelta replacement

Project description

Installation

$ [sudo] pip install timedelta

Classes

class __doc__
timedelta.Timedelta datetime.timedelta replacement
timedelta.Total

Examples

>>> import timedelta

>>> td = timedelta.Timedelta(days=2, hours=2)

# init from datetime.timedelta
>>> td = timedelta.Timedelta(datetime1 - datetime2)

total seconds, minutes, hours, days

>>> td = timedelta.Timedelta(days=2, hours=2)
>>> td.total.seconds
180000
>>> td.total.minutes
3000
>>> td.total.hours
50
>>> td.total.days
2

Links

readme-generator

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

Uploaded Source

Built Distribution

timedelta-2019.3.24-py2.py3-none-any.whl (176.7 kB view hashes)

Uploaded Python 2 Python 3

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