Esc

date_time_to_calendar

procedureextensionsince 0.36.1Source
  • macOS: date_time_to_calendar works on macOS
  • Linux: date_time_to_calendar works on Linux
  • Windows: date_time_to_calendar works on Windows
  • Wasm: date_time_to_calendar works on Wasm

Converts a civil reading as UTC-tagged fields; rejects submillisecond precision.

Signature

date_time_to_calendar :: (
    value: Date_Time
) -> (Basic.Calendar_Time, Time_Error)
Example↗
calendar, error := date_time_to_calendar(.{ .{ 2024, 2, 29 }, .{ 12, 30, 0, 0 } });
assert(error.kind == .NONE && calendar.month_starting_at_0 == 1 && calendar.day_of_month_starting_at_0 == 28);

See also