Iso8601¶
Lenient ISO 8601 parsing/formatting. Accepts the dialects RFC 3339
rejects: T/t/space for the date-time separator, Z/z for
zulu. Inputs without an offset require a fallback zone name,
resolved via _TzData.
Constructors¶
create¶
Returns¶
- Iso8601 val^
Public Functions¶
parse¶
Parse an ISO 8601 timestamp. If the input carries an offset,
fallback_zone_name is ignored and the result is in Offset mode.
If the input lacks an offset (TODO: not yet supported in v1; see
_parse_or_fallback), fallback_zone_name is used as the IANA
zone via _TzData.
Parameters¶
Returns¶
- (ZonedDateTime iso^ | ParseError)
parse_in_place¶
Lenient parse, mutating zdt. See parse for semantics.
fun box parse_in_place(
s: String val,
fallback_zone_name: String val,
zdt: ZonedDateTime ref)
: (None val | ParseError)
Parameters¶
- s: String val
- fallback_zone_name: String val
- zdt: ZonedDateTime ref
Returns¶
- (None val | ParseError)
format¶
Same canonical format as RFC 3339.
Parameters¶
- zdt: ZonedDateTime box
Returns¶
- String iso^
format_in_place¶
Parameters¶
- zdt: ZonedDateTime box
- buf: String ref
Returns¶
- None val
eq¶
Parameters¶
- that: Iso8601 val
Returns¶
- Bool val
ne¶
Parameters¶
- that: Iso8601 val
Returns¶
- Bool val