CalendarValue

CalendarValue :: # (opaque)

A finite calendar selection retaining its supplied resolution and calendar. This native profile supports Gregorian/Julian provider years and 1–6 decimal fraction digits. It is not a timestamp parser or an uncertainty model. Minute 12:30 differs from second 12:30:00, and fraction .12 from .120. Canonical starts fill omitted lower fields solely to describe selection bounds. Construction is constant work and does not resolve zones or enumerate values. An exclusive upper boundary outside the provider range fails only at lowering.

year : Calendar, I64 -> Try(CalendarValue, [OutOfRange, InvalidMonth, InvalidDay, ..])
month : Calendar, I64, U8 -> Try(CalendarValue, [OutOfRange, InvalidMonth, InvalidDay, ..])
day : CalendarDate -> CalendarValue
hour : CalendarDate, U8 -> Try(CalendarValue, [InvalidHour, InvalidMinute, InvalidSecond, UnsupportedLeapSecond, InvalidMicrosecond, ..])
minute : CalendarDate, U8, U8 -> Try(CalendarValue, [InvalidHour, InvalidMinute, InvalidSecond, UnsupportedLeapSecond, InvalidMicrosecond, ..])
second : CalendarDate, U8, U8, U8 -> Try(CalendarValue, [InvalidHour, InvalidMinute, InvalidSecond, UnsupportedLeapSecond, InvalidMicrosecond, ..])
fractional_second : CalendarDate, { hour : U8, minute : U8, second : U8 }, { value : U32, digits : U8 } -> Try(CalendarValue, [InvalidFraction, UnsupportedPrecision, InvalidHour, InvalidMinute, InvalidSecond, UnsupportedLeapSecond, InvalidMicrosecond, ..])

fraction is the supplied decimal integer: {value: 12, digits: 2} is .12. Zero digits and values requiring more digits are malformed. More than six digits are unsupported, even when trailing zeroes could be discarded.

local_bounds : CalendarValue -> Try({ start : LocalDateTime, end : LocalDateTime }, [OutOfRange, ..])

Half-open civil selection. O(1), with no zone choice or elapsed-time claim. Year/month bounds use Gregorian/Julian's twelve-month shape explicitly.

selection_cursor : CalendarValue, ZoneRules -> Try(SelectionCursor, [OutOfRange, EmptySelection, ReversedSelection, OutsideValidity, ..])

Resolve the entire local selection, including all fold components and empty gaps. Uses the shared bounded cursor; no earliest/latest envelope. Cursor construction does not consume the transition table. Explicit SelectionLimits govern subsequent ZoneRules.SelectionCursor.collect calls.

is_eq : CalendarValue, CalendarValue -> Bool

Description equality, including precision and calendar identity.

fact_count : CalendarValue -> U64

Constant-cost random-access observations; no selection is resolved.

fact_at : CalendarValue, U64 -> [End, Item(SemanticFact)]
Resolution : [Year, Month, Day, Hour, Minute, Second, Fraction(U8)]