Skip to main content

tdfmt is a concise timedelta formatter

Project description

tdfmt

tdfmt is a concise timedelta formatter

from datetime import timedelta
from tdfmt import tdfmt

print(tdfmt(timedelta(hours=3, minutes=14, seconds=15, microseconds=926535)))  # 3h14m15.926535s
print(tdfmt(timedelta(hours=4, minutes=20)))                                   # 4h20m0s
print(tdfmt(timedelta(minutes=17, seconds=38)))                                # 17m38s
print(tdfmt(timedelta(seconds=9)))                                             # 9s
print(tdfmt(timedelta(minutes=1, milliseconds=300)))                           # 1m0.3s
print(tdfmt(timedelta(microseconds=12340)))                                    # 12.34ms
print(tdfmt(timedelta(microseconds=12)))                                       # 12µs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tdfmt-0.0.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file tdfmt-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tdfmt-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for tdfmt-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdbffe9c54f3bb00643df695811fdf1ce11086479a673ae089e8709f15280e5b
MD5 bfebeb8725b549b0d8a83c8a2694cffd
BLAKE2b-256 ce2f20dc562aadbcdb296055b95d720b22a0a1d0600211b3decc0ebeaa530647

See more details on using hashes here.

Supported by

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