Chalk home page
Docs
API
CLI
  1. Custom Types
  2. Duration

Duration

Durations in Chalk can be given in natural language, or specified using datetime.timedelta. To specify using natural language, write the count of the unit you would like, followed by the representation of the unit. Chalk support the following units:

SignifierMeaning
w Weeks
d Days
h Hours
m Minutes
s Seconds
ms Milliseconds

Examples

Using these, we can write:

SignifierMeaning
“10h” 10 hours
“1w 2m” 1 week and 2 minutes
“1h 10m 2s” 1 hour, 10 minutes, and 2 seconds