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

Copy Markdown View Source

Summary

Functions

Qualification that attaches to a specific component.

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.

Functions

all_unspecified()

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

colon()

component_qualification(combinator \\ empty(), unit)

Qualification that attaches to a specific component.

Emitted as {unit_qualification: qualifier} so that downstream consumers can identify which component is being qualified (e.g. {:year_qualification, :uncertain}).

convert_bc(list)

dash()

day_of_week()

decimal_separator()

digit()

extract_repeat_rule(list)

half()

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()

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)

sign()

unspecified()

zulu()