Skip to main content

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


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 details)

Uploaded Source

Built Distribution

fuzzyduration-0.2.0-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

Details for the file fuzzyduration-0.2.0.tar.gz.

File metadata

  • Download URL: fuzzyduration-0.2.0.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.12.9-1-MANJARO

File hashes

Hashes for fuzzyduration-0.2.0.tar.gz
Algorithm Hash digest
SHA256 82ae5e8fd4a6781d812e9f4bf653f81ee8e852a51df882cc91694217348837f3
MD5 24fe0bfee820791af3cdee8b450b9cd8
BLAKE2b-256 cd369187bc47e138a78730b48fc91394d3fa0e6bedc1c3b0d2ead23c128fed40

See more details on using hashes here.

File details

Details for the file fuzzyduration-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fuzzyduration-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.12.9-1-MANJARO

File hashes

Hashes for fuzzyduration-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05203b326e2f4fe025bc4b59115f8a8406936b20209f353875450e275b3bea4a
MD5 57d0b35946510be05c27918013f3e07f
BLAKE2b-256 9e91fc4c58aaf32b6b7b1eb66df6135898078c7fdb9e465187b168ffe724289c

See more details on using hashes here.

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