returns the number of seconds as the approx. largest unit of time.
Project description
Fuzzy Duration
A simple package to convert a number of seconds to the approximate duration of the largest time unit.
install
python3 -m pip install fuzzyduration --user
Usage
from fuzzyduration import fuzzyDuration
secs = 60 * 60 * 24 * 1 + 1234
result = fuzzyDuration(secs)
print(result) # "1 day"
secs = secs * 8 * 2
print(result) # "2 weeks"
secs = secs * 60
print(result) # "2 years"
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
fuzzyduration-0.2.0.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for fuzzyduration-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05203b326e2f4fe025bc4b59115f8a8406936b20209f353875450e275b3bea4a |
|
MD5 | 57d0b35946510be05c27918013f3e07f |
|
BLAKE2b-256 | 9e91fc4c58aaf32b6b7b1eb66df6135898078c7fdb9e465187b168ffe724289c |