Expand description
Common data and time functions.
Constants§
- MILLISECONDS_
IN_ SECOND - Number of milliseconds in one second.
- NANOSECONDS_
IN_ MICROSECOND - Number of nanoseconds in one microsecond.
- NANOSECONDS_
IN_ MILLISECOND - Number of nanoseconds in one millisecond.
- NANOSECONDS_
IN_ SECOND - Number of nanoseconds in one second.
- WEEKDAYS
- List of weekdays (Monday to Friday).
Functions§
- add_
n_ months - Add
n
months to a chronoDateTime<Utc>
. - floor_
to_ nearest_ microsecond - Floor the given UNIX nanoseconds to the nearest microsecond.
- is_
leap_ year - Basic leap-year check
- is_
within_ last_ 24_ hours - Check whether the given UNIX nanoseconds timestamp is within the last 24 hours.
- last_
day_ of_ month - Returns the last valid day of
(year, month)
. - last_
weekday_ nanos - Calculates the last weekday (Mon-Fri) from the given
year
,month
andday
. - micros_
to_ nanos - Converts microseconds (μs) to nanoseconds (ns).
- millis_
to_ nanos - Converts milliseconds (ms) to nanoseconds (ns).
- nanos_
to_ micros - Converts nanoseconds (ns) to microseconds (μs).
- nanos_
to_ millis - Converts nanoseconds (ns) to milliseconds (ms).
- nanos_
to_ secs - Converts nanoseconds (ns) to seconds.
- secs_
to_ millis - Converts seconds to milliseconds (ms).
- secs_
to_ nanos - Converts seconds to nanoseconds (ns).
- subtract_
n_ months - Subtract
n
months from a chronoDateTime<Utc>
. - unix_
nanos_ to_ iso8601 - Converts a UNIX nanoseconds timestamp to an ISO 8601 (RFC 3339) format string.
- unix_
nanos_ to_ iso8601_ millis - Converts a UNIX nanoseconds timestamp to an ISO 8601 (RFC 3339) format string with millisecond precision.