Metadata-Version: 2.1
Name: humanfriendlyduration
Version: 1.0.0
Summary: A simple Python package for converting seconds to human-friendly duration strings.
Home-page: https://github.com/omerhrr/humanfriendlyduration
Author: Umar Lawal
Author-email: pyomerhrr@gmail.com
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

uman-friendly-duration

Human-friendly-duration is a Python package that formats a duration, given as a number of seconds, in a human-friendly way. The package can be used to convert the duration of time into a combination of years, days, hours, minutes, and seconds.
Installation

human-friendly-duration can be installed using pip:

sh

pip install human-friendly-duration

Usage

python

from humanfriendly_duration import format_duration

print(format_duration(62)) # output: 1 minute and 2 seconds
print(format_duration(3662)) # output: 1 hour, 1 minute and 2 seconds

If the duration is zero, it will return "now".

python

print(format_duration(0)) # output: now

