Tempo.Iso8601.Tokenizer.Helpers (Tempo v0.10.0)

Copy Markdown View Source

Summary

Functions

ISO 8601-2 §8.2.3 individual qualification — a qualifier symbol immediately to the left of a component (implicit form). It qualifies that component only.

Merge a trailing {:qualification, _} token into the preceding tagged date/datetime/time inner list. Used by the :qualified_endpoint parsec to keep each interval endpoint and its qualification paired.

ISO 8601-2 / EDTF qualification suffix.

ISO 8601-2 §8.2.2 group qualification — a qualifier symbol immediately to the right of a component. It qualifies that component's value and all components to its left (of coarser resolution). When the component is the rightmost of the whole expression the consumer instead treats it as §8.2.1 complete qualification.

Functions

all_unspecified()

check_valid_date(rest, args, context, line, offset)

colon()

convert_bc(list)

dash()

day_of_week()

decimal_separator()

digit()

extract_repeat_rule(list)

half()

left_qualifier(combinator \\ empty(), unit)

ISO 8601-2 §8.2.3 individual qualification — a qualifier symbol immediately to the left of a component (implicit form). It qualifies that component only.

Emitted as {:individual_qualification, {unit, qualifier}}.

merge_endpoint_qualification(tokens)

Merge a trailing {:qualification, _} token into the preceding tagged date/datetime/time inner list. Used by the :qualified_endpoint parsec to keep each interval endpoint and its qualification paired.

Returns a single tuple so that the reduce emits one value into the enclosing parser accumulator, matching the shape emitted by parsec(:datetime_or_date_or_time) when no qualifier is present.

negative()

positive()

qualification(combinator \\ empty())

ISO 8601-2 / EDTF qualification suffix.

? marks a date as uncertain (the value is a best guess). ~ marks it as approximate (the value is approximately correct, e.g. "circa 1850"). % marks both.

quarter()

reduce_half(list)

reduce_quarter(list)

right_qualifier(combinator \\ empty(), unit)

ISO 8601-2 §8.2.2 group qualification — a qualifier symbol immediately to the right of a component. It qualifies that component's value and all components to its left (of coarser resolution). When the component is the rightmost of the whole expression the consumer instead treats it as §8.2.1 complete qualification.

Emitted as {:group_qualification, {unit, qualifier}}.

sign()

unspecified()

zulu()