Skip to main content

Module time

Module time 

Source
Expand description

Calendar constants and helpers.

Constants§

DAYS_PER_MONTH
NS_DAY
NS_HOUR
NS_MICROSECOND
nanoseconds per unit
NS_MILLISECOND
NS_MINUTE
NS_SECOND
NS_WEEK
NTE_NS_DAY
Not-to-exceed (NTE) nanoseconds per unit, accounting for DST. This is an upper bound. Leap seconds do not matter for correctness.
NTE_NS_WEEK

Functions§

days_in_month
Get the number of days in the given month of the given year
is_leap_year