Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

0018: Civil date and time sample conventions

The civil-time contract selects conventional representations and a bounded interpretation of exceptional labels.

FullBaseline recognizes the corresponding model interpretations without a test value. M049 model meaning is independent of denotation for any particular constant or selected value, so recognizing a format never records an adjustment knowledge consultation. Constants continue to use the actual borrowed operand and its established temporal denotation under this decision.

Civil date-time, date, and time samples use decoded JSON strings representing RFC 3339 date-time, full-date, and full-time, respectively, following RFC 9880 Appendix C.2. Their abstract meanings remain distinct from the conventional text representation and from document metadata modified, whose date-time convention requires Z. The grammar, exact fractional seconds, Gregorian calendar, case and numeric offsets follow RFC 3339 Sections 4 and 5, without additional limits imported from a calendar library.

The selected sample convention uses T/t between date and time and Z/z or a signed HH:MM offset. It preserves -00:00 as known UTC time with an unknown local offset under the recorded RFC 3339 baseline. RFC 9557’s changed Z annotation and its timestamp suffix grammar are separate baseline and representation decisions. Invalid conventional forms give a sample representation rejection; unsupported interpretation, needed absent leap knowledge and exhausted capability give an affected undetermined conclusion. No such limitation becomes an invented RFC-invalid diagnosis.

Dated leap-second meaning uses deliberately recorded IERS knowledge after offset adjustment. A positive inserted second is admitted only on an established insertion date; a known noninsertion or impossible UTC slot rejects it. A possible leap boundary outside recorded knowledge remains undetermined, including second 59 when an unestablished negative adjustment could remove it. Date-free time admits ordinary clock seconds 00..59 without assigning a date; a possible inserted-second label 60 remains undetermined because its eligible leap-label interpretation is unestablished. RFC 3339 full-time intentionally has no date, so this is not a missing required field or proof of invalidity. This date-free convention does not assert that the coordinate exists on every day.

Locations, admission areas, finite controls and aggregate outcomes follow ADR 0016: Selected samples with explicit admission and coverage. Temporal denotation and comparison remain separate under ADR 0015: Bounded value equality in a resolved data context. The adopted comparator scope includes Gregorian dates under the existing full-date convention: both operands must establish valid calendar dates; the same calendar date is equal and different calendar dates differ. JSON escape spelling does not alter the decoded date. This requires neither a timezone nor leap-second knowledge and introduces no ordering operation, epoch conversion or additional date representation. The civil-time contract pins concrete forms, knowledge scope and representative observations.

Dated date-time equality compares established UTC instants, excluding offset annotations from value identity. Subtract the numeric offset with Gregorian day/year rollover, including UTC dates beyond the four-digit source range. T/t, Z/z, +00:00 and -00:00 retain their admitted meanings. Fractions compare as exact decimal digit sequences with trailing zeros ignored; absent and all-zero fractions coincide. An inserted second remains a separate slot from the preceding ordinary second and the next day’s first second. Both operands must establish denotation, including any needed recorded adjustment knowledge, before the comparator can conclude equality or difference. Date-free time equality beyond identical denoting representations remains unavailable.

The shared evaluator establishes civil denotation for selected samples and declared-value consistency. It retains ordinary text-length checks and compares Gregorian dates or dated instants after both denotations and their common format are established across every relevant alternative. The fixed-width full-date convention permits validated decoded text to establish calendar equality or difference without retaining a normalized temporal value. Full date-time comparator capability includes established compatible nullable contexts and recursive projections; model capability recognition alone makes no claim about an actual operand’s denotation or adjustment knowledge. Formatted-null comparison follows ADR 0015; null/null requires no nonnull scan, and a mixed pair requires the nonnull denotation. One admitting alternative supplies no equality interpretation; unknown or incompatible interpretations, restricted Direct meanings and exhausted work remain scoped limitations.

Reports identify consumed representation convention as ADR0018-selected-representation and record C72 knowledge only when an actual slot query uses it. Request-level use survives discarded branch findings and optional presentation omission. A temporal unknown contributes one specialized incomplete detail for its cause while independent unfinished work keeps its own details and the existing area counts. Original counters, owner shares and first-result lifetime remain shared and unchanged.

Implementation rationale

The private borrowed capability shares Gregorian arithmetic and recorded leap facts with metadata modified; each consumer keeps its own representation grammar. Instant comparison temporarily borrows exact fractional text alongside a UTC Gregorian date, minute and distinct second slot. It retains no epoch coordinate or normalized value after comparison. Two text passes and bounded calendar work are precharged, and temporary comparison storage is included in the existing allocation accounting. This avoids a second facts table, a public parsing API, rounding or an implicit comparison convention.

Considered Options

UTC-only parsing would conflate model metadata with data formats. A library’s year range, nanosecond precision, timezone plausibility filter or automatic leap normalization could silently narrow the RFC’s representation and erase exceptional forms. Identical-representation-only date-time comparison leaves routine offset-equivalent event timestamps unfinished; including offset annotations in identity would distinguish established representations of the same instant. Automatically refreshing IERS data would change a conclusion without a recorded baseline change. Treating the absence of a future insertion announcement as a universal no-leap proof would mishandle future positive and negative adjustments. Assigning a host date would invent an absent input. An existential some-valid-date interpretation could admit a date-free inserted-second label, but SDF and RFC 3339 do not select that quantifier; it remains a deliberately deferred alternative. Admitting a space separator is an available application convention under the RFC’s note; this contract selects the named T/t production and diagnoses other selected-representation forms without denying their possible abstract meaning.