Skip to main content

PYPI package with 2 functions to convert datetime.timedelta into string with nice format

Project description

GitHub last commit GitHub license<space><space> PyPI PyPI - Python Version

Overview.

timedelta_nice_format is a PYPI package made with only one simple goal to convert time durations into nice human readable format

datetime.timedelta into nice formatted string

import datetime
from timedelta_nice_format import timedelta_nice_format

start = datetime.datetime.now()
# ...
# You code here
# ...
print(
    "Duration:",
    timedelta_nice_format(
        datetime.datetime.now()-start
    )
)

duration in seconds into nice formatted string

import time
from timedelta_nice_format import seconds_nice_format
start = time.time()
# ...
# You code here
# ...
print("Duration:", seconds_nice_format(time.time()-start))

Installation via pip:

pip install timedelta_nice_format

Contacts

License

This project is licensed under the MIT License.

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

timedelta_nice_format-0.1.0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

timedelta_nice_format-0.1.0-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

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