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
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-2020.12.3.tar.gz
(1.6 kB
view details)
File details
Details for the file timedelta-2020.12.3.tar.gz.
File metadata
- Download URL: timedelta-2020.12.3.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41c28b314de9cb6e4c95fcc9f4e3ecee435f2fc821a079cd9243be4783ac4cf4
|
|
| MD5 |
575441959f480cc4d5de06c40408d3f7
|
|
| BLAKE2b-256 |
e713de3fa1eb076ff851805b498a60e212e2d8db44d364f49addfc272d25a544
|