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

Uploaded Source

Built Distribution

datime-2025.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: datime-2025.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.17

File hashes

Hashes for datime-2025.0.tar.gz
Algorithm Hash digest
SHA256 2f43bb3245083223c203660bb6dc51894e2ffe75e7c5dfa32592c5d5c3d689e3
MD5 0877ac5cd3a7e164e1ce8d40f0a9ffe9
BLAKE2b-256 c4c2859f930489dd43e72fb7174b0e6213c769b32739b5b5a7173cf669eb1c3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: datime-2025.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.17

File hashes

Hashes for datime-2025.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66d90e6532a0407a7aecc6cfe025dd47a7f5a8e018eb2b786d70bc785e972793
MD5 e79c81d395c4716289b38f2d46046249
BLAKE2b-256 1f93b6fe150918ec307fed0a0d2a53f5701efc377d630a4f1da15c3d6a5dc45d

See more details on using hashes here.

Supported by

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