Skip to main content

datetime.timedelta replacement

Project description

Installation

$ [sudo] pip install timedelta

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

readme42.com

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

Uploaded Source

File details

Details for the file timedelta-2020.7.1.tar.gz.

File metadata

  • Download URL: timedelta-2020.7.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/47.3.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.7

File hashes

Hashes for timedelta-2020.7.1.tar.gz
Algorithm Hash digest
SHA256 fd990d7c3e8161a4953510d2c6ca5316d9c146650d09e7c9af5de1f5d049c838
MD5 028642e98e2917fd30d3af182e6b477b
BLAKE2b-256 b6fb140268e9efa29536a5211c09ad76aa5dafdfc1205932dbdf246da2ad5383

See more details on using hashes here.

Supported by

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