QualifiedCalendarValue

QualifiedCalendarValue :: # (opaque)

A finite calendar description with explicitly scoped qualifications. Uncertain and approximate are independent flags, not numerical tolerances. A month qualification does not qualify the year/day or the whole value. This is a native description type, not an EDTF parser or reasoning model.

YearMonth qualifies the supplied year and month together, leaving finer components unchanged. It supplies no tolerance or correlation model. At most one qualification per supplied component, group and whole value. Construction validates and canonicalizes at most nine entries; input order has no semantic meaning. Whole and component qualifications may coexist and are retained independently, without inferring redundancy or contradiction.

new : Value, List(Qualification) -> Try(QualifiedCalendarValue, [TooManyQualifications, DuplicateScope(Scope), UnsuppliedComponent(Scope), ..])

Attach up to nine qualifications and canonicalize their order. Reject repeated scopes and scopes finer than the value supplies. Whole and component scopes may coexist; this constructor does not choose an interpretation model.

described_value : QualifiedCalendarValue -> Value

The named value alone is descriptive evidence, not an interpretation of its qualifiers. Extracting it does not establish an admissible tolerance.

qualifications : QualifiedCalendarValue -> List(Qualification)

Return the qualifications in canonical scope order.

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

Only an unqualified description has an unconditional certain selection. Qualified descriptions require an explicit admissible model; CalendarEvidence provides finite-alternative point queries. NeedsModel is checked here before any zone work or range lowering.

is_eq : QualifiedCalendarValue, QualifiedCalendarValue -> Bool

Compare the described value and scoped qualifications, independently of input order.

to_hash : QualifiedCalendarValue, Hasher -> Hasher

Hash the described value and canonical qualifications consistently with is_eq.

fact_count : QualifiedCalendarValue -> U64

Summary, zone requirement, optional model requirement, then scoped facts. Indexing does not enumerate qualifications or interpret their meaning.

fact_at : QualifiedCalendarValue, U64 -> [End, Item(SemanticFact)]

Read a zero-based summary, context/model requirement, or qualification fact. Return End beyond fact_count; no zone or tolerance interpretation occurs.

to_inspect : QualifiedCalendarValue -> Str

Return the bounded description summary without interpreting qualifications.

Scope : [Whole, Year, Month, Day, Hour, Minute, Second, Fraction, YearMonth]

The supplied component, year/month group, or whole value being qualified. A component scope does not qualify its neighboring components.

Qualifier : [Uncertain, Approximate, UncertainApproximate]

Uncertainty, approximation, or both; these flags supply no numeric tolerance.

Qualification : { scope : Scope, qualifier : Qualifier }

One explicitly scoped uncertainty or approximation assertion.