DateTime¶
Import: import system;
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
day_of_year¶
The day of the year (1-based).
add¶
Returns the instant d after this date/time, keeping its UTC offset.
until¶
Returns the duration from this instant to other.
start_of_day¶
Returns midnight on the same calendar date, keeping this UTC offset.
compare¶
Orders two instants by their UTC epoch milliseconds, ignoring the display offset. Returns -1 when this is earlier, 0 when equal, and 1 when later.
is_before¶
True if this is before other.
is_after¶
True if this is after other.
equals¶
True if this equals other.
to_iso8601¶
Formats as ISO-8601.
to_string¶
A human-readable formatting.
parse¶
Parses an ISO-8601 datetime (YYYY-MM-DDTHH:MM:SS[.frac][Z|±HH:MM]).