Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 297 Bytes

File metadata and controls

21 lines (13 loc) · 297 Bytes

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)