Esc

Time_Options

structextensionsince 0.36.1Source
  • macOS: Time_Options works on macOS
  • Linux: Time_Options works on Linux
  • Windows: Time_Options works on Windows
  • Wasm: Time_Options works on Wasm

Declaration

Time_Options :: struct {
    max_text: s64 = 4096;    max_tzif_bytes: s64 = 16 * 1024 * 1024;    max_transitions: s64 = 1000000;    max_types: s64 = 256;    max_abbreviation_bytes: s64 = 65536;}

Bounds on text, TZif data and rule counts. Each public parser checks these before copying or allocating input-derived storage.

Example↗
options := Time_Options.{ max_text = 8 };
_, error := parse(Timestamp, "2024-03-10T07:30:00Z", options);
assert(error.kind == .LIMIT);

See also