time Module
Functions for working with time-of-day values, including extraction, construction, arithmetic, and formatting.
Extraction
Construction
Manipulation
Formatting
Function Reference
| Function | Description |
|---|---|
| time::hour | Extract the hour (0-23) from a time value. |
| time::minute | Extract the minute (0-59) from a time value. |
| time::second | Extract the second (0-59) from a time value. |
| time::nanosecond | Extract the nanosecond component from a time value. |
| time::new | Create a new time from hour, minute, and second components. |
| time::now | Get the current time of day. |
| time::add | Add a duration to a time value. |
| time::subtract | Subtract a duration from a time value. |
| time::diff | Calculate the difference between two time values. |
| time::trunc | Truncate a time to a specified precision. |
| time::age | Calculate the elapsed duration from a time value until now. |
| time::format | Format a time value as a string. |
