Esc

next

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

Advances a transition cursor; false with no error means the range is exhausted.

Signature

next :: (cursor: *Time_Transitions) -> (Time_Transition, bool, Time_Error)
Example↗
zone, zone_error := time_zone_from_posix("EST5EDT,M3.2.0,M11.1.0");
assert(zone_error.kind == .NONE);
defer time_zone_free(*zone);
start, _ := timestamp_from_seconds(1704067200);
cursor := transitions(zone, start);
spring, _, _ := next(*cursor);
autumn, _, _ := next(*cursor);
assert(spring.after.seconds == -14400 && autumn.after.seconds == -18000);

See also