Skip to content

Iso8601

[Source]

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.

primitive val Iso8601

Constructors

create

[Source]

new val create()
: Iso8601 val^

Returns


Public Functions

parse

[Source]

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.

fun box parse(
  s: String val,
  fallback_zone_name: String val)
: (ZonedDateTime iso^ | ParseError)

Parameters

Returns


parse_in_place

[Source]

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

Returns


format

[Source]

Same canonical format as RFC 3339.

fun box format(
  zdt: ZonedDateTime box)
: String iso^

Parameters

Returns


format_in_place

[Source]

fun box format_in_place(
  zdt: ZonedDateTime box,
  buf: String ref)
: None val

Parameters

Returns


eq

[Source]

fun box eq(
  that: Iso8601 val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: Iso8601 val)
: Bool val

Parameters

Returns