Skip to content
/ htd Public

Minimal library to parse human time deltas (htd)

License

Notifications You must be signed in to change notification settings

Bixoto/htd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8a7eca0 · Jan 28, 2025

History

4 Commits
Jan 28, 2025
Jan 28, 2025
Jan 28, 2025
Jan 28, 2025
Jan 28, 2025
Jan 28, 2025
Jan 28, 2025
Jan 28, 2025
Jan 28, 2025

Repository files navigation

htd

htd stands for human time delta and is a micro-library to parse strings such as 7d4h into timedelta(days=7, hours=4).

Install

pip install htd

With Poetry:

poetry add htd

Usage

import htd

htd.parse("7d")
# => datetime.timedelta(days=7)