std:datetime/RFC3339
std:datetime/RFC3339
Section titled “std:datetime/RFC3339”Canonical occurrence:
protos/lib/datetime/RFC3339.protos· Protos revision:e99b712ecf658a527b1fe82c8beba2c1286d8dc9.
A bounded RFC 3339 Internet timestamp adapter for
std:datetime/OffsetDateTime. It accepts and writes only timestamps that
LIB013 represents exactly:
YYYY-MM-DDTHH:MM:SS[.fraction]OFFSETThe year is exactly four digits, 0000 through 9999; month, day, hour,
minute, and second are exactly two digits; T is uppercase; the fraction
is absent or one through nine digits; and OFFSET is uppercase Z or a
numeric +HH:MM or -HH:MM.
RFC 3339 features with no exact LIB013 value are rejected rather than
normalized: lowercase t and z, leap-second :60 labels (LIB013 has no
leap seconds), ten or more fraction digits (precision is exactly
nanoseconds and nothing is rounded), and -00:00, whose RFC 3339 meaning
of a known UTC instant with an unknown local offset cannot be held by an
offset date-time without losing information. Numeric offsets have minute
resolution only, so second-resolution offsets and negative or expanded
years are not RFC 3339 text even though std:datetime/ISO8601 writes
them.
Every timestamp accepted here is also accepted by std:datetime/ISO8601
with the same meaning, so this adapter enforces its narrower grammar and
then shares that profile’s construction through the value modules. It has
no time-zone, time-zone database, locale, or clock authority.
Observable top-level slots
Section titled “Observable top-level slots”This page lists the complete mechanically observable top-level slot inventory required by D067. Authored documentation, when present, is canonical D062 prose; mechanical presence alone does not create a stability or compatibility promise.
formatOffsetDateTime
Section titled “formatOffsetDateTime”Answers the canonical RFC 3339 text of value, a value recognized by
std:datetime/OffsetDateTime: the four-digit-year local date-time with an
uppercase T, mandatory seconds, and the fraction written as in
std:datetime/ISO8601, followed by Z for a zero offset or ±HH:MM. The
value is written as stored and never normalized to UTC. Any other
argument, a negative year, or an offset that is not a whole number of
minutes signals an Error; the value itself remains valid and the offset is
never rounded.
Mechanical facts
Section titled “Mechanical facts”-
Fixed parameters:
value -
Rest parameter: none
-
Source occurrence:
protos/lib/datetime/RFC3339.protos:85 -
Exact source page: open in the source browser
parseOffsetDateTime
Section titled “parseOffsetDateTime”Parses text as exactly YYYY-MM-DDTHH:MM:SS[.fraction] followed by Z
or ±HH:MM, and answers a fresh std:datetime/OffsetDateTime holding the
local date-time and offset as written. A non-String argument, any other
form, -00:00, second 60, ten or more fraction digits, an offset outside
std:datetime/Offset’s range, or an invalid date or time signals an Error.
Mechanical facts
Section titled “Mechanical facts”-
Fixed parameters:
text -
Rest parameter: none
-
Source occurrence:
protos/lib/datetime/RFC3339.protos:49 -
Exact source page: open in the source browser
Exact module source · Standard-library API · Standard library overview