Skip to main content

Python package with convenience functions for dates, times, and intervals

Project description

datime

Python package with convenience functions for dates, times, and intervals

Usage

pretty_duration_short

Use the function pretty_duration_short to convert a whole number of seconds to a string that indicates the number of hours, minutes, and seconds in the provided duration.

>>> import datime
>>> datime.pretty_duration_short(59)
'59s'
>>> datime.pretty_duration_short(256)
'4m16s'
>>> datime.pretty_duration_short(60 * 60)
'1h0m0s'
>>> datime.pretty_duration_short(4096)
'1h8m16s'
>>> datime.pretty_duration_short(2**17)
'36h24m32s'

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

datime-2023.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

datime-2023.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file datime-2023.1.tar.gz.

File metadata

  • Download URL: datime-2023.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for datime-2023.1.tar.gz
Algorithm Hash digest
SHA256 25d0a95c0721d1cc76fd056edc2e86a87b420f4ef293e9fbe9574046e466223f
MD5 4743a71b9b2d4d33c3a65a2a112b966a
BLAKE2b-256 59877324264e648d26eba079d9c980d09a208aea05667f0782ab70bb01532aee

See more details on using hashes here.

File details

Details for the file datime-2023.1-py3-none-any.whl.

File metadata

  • Download URL: datime-2023.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for datime-2023.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f9f1825a4237dcee2e9635b1e0440a84f9fea173f03a3bbdf25318df8640b9b9
MD5 37786b34fa4f334195ef667bddd304db
BLAKE2b-256 b92db4b1d7e01bcdc6849646305a1f8dd054f529085c76445a91658745149af5

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