Metadata-Version: 2.4
Name: larztime
Version: 0.1.0
Summary: Human-friendly durations and relative time from plain numbers, zero dependencies
Author: larz-scripter
License: MIT
Project-URL: Homepage, https://github.com/larz-scripter/larztime
Project-URL: Repository, https://github.com/larz-scripter/larztime
Project-URL: Issues, https://github.com/larz-scripter/larztime/issues
Keywords: time,duration,humanize,education,learn-to-code,relative-time,formatting,zero-dependency,pure-python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# larztime

**Human-friendly time — durations and relative time, in words people can read.**

"93784 seconds" means nothing to a person; "1 day, 2 hours, 3 minutes" does.
larztime turns durations into readable words (and back), formats clocks, and says
things like "3 minutes ago" — all from plain numbers you pass in, so it's fully
deterministic and testable (it never reads the system clock for you). Zero
dependencies.

## Install

```bash
pip install larztime
```

## Use

```python
from larztime import humanize, short, clock, parse_duration, ago

humanize(93784)            # '1 day, 2 hours, 3 minutes, 4 seconds'
short(93784)               # '1d 2h 3m 4s'
clock(3725)                # '01:02:05'
parse_duration("1h30m")    # 5400
ago(100, 400)              # '5 minutes ago'   (then=100, now=400)
```

## Learn to code with Larz

Part of the **learn-to-code toolkit** in the [Larz stack](https://github.com/larz-scripter) —
see the [Learn to Code platform](https://larzos.com/learn/).

## Tests

```bash
python -m unittest discover -s tests -v   # 9 tests
```

## License

MIT (c) larz-scripter
