Default
Default
In-browser search
Settings
The words Tempo's API and documentation use, each with the one meaning it has. Tempo holds to two rules: a word means one thing, and a thing has one word. A standard's own term is used where the standard is being quoted (Allen's relations, ISO 8601's repeat rule and selection , RFC 5545's property names) and nowhere else. A new name is checked against this page before it is given.
The tables are grouped by subject, and within a table the terms a later one builds on come first.
Spans Term Meaning Where expression One thing as it is written or built: a value, an interval, a recurrence, a set. All are a %Tempo{}, and one expression is in one calendar and one zone. Tempo.t/0span A stretch of the time line with a first instant and a last. Every Tempo value is one. Tempo.to_interval/2half-open A span holds its first instant and not its last: [from, to). every span value A date or a time written to some unit, which names the span of that unit: 2026-06 is June. Tempo.new/1 , ~o"2026-06"interval A span written with its two ends, or with one end and a length. Tempo.Interval.new/1 , ~o"2026-06-01/2026-06-30"written end The end of an interval as its text gives it: a date is read through, a time of day is the reading the span runs to. Tempo.Interval.to/1ends A span's from and to. Tempo.Interval.from/1 , Tempo.Interval.to/1extent Where a span starts and where it ends. Tempo.to_interval/2resolution The finest unit a value states: a day for 2026-06-15. Tempo.resolution/1unit A year, a month, a day, an hour and the rest. A walk of a value yields the unit below its resolution; a walk of an interval, its ends' own. Tempo.walk/2bounded Both ends are stated. Tempo.bounded?/1open An end is not stated (2026-06-15/..). Tempo.Interval.to/1duration A length of time with no place on the time line (P1M). Tempo.Duration , Tempo.duration/1instant A point with no length. Tempo has none: its finest value is a span as long as its resolution.
Placing a value Term Meaning Where anchored The value has a year, and so a place on the time line. Tempo.anchored?/1unanchored The value has no year and comes round again: 10:30, or 15 June. Tempo.anchored?/1frame What two expressions must share to be related or combined: the one time line of zoned values, the wall clock of floating ones, or the cycle of values with no year. Tempo.FrameErrorat, onPlace a time of day on a day: 17:00 on 15 June. Tempo.at/2 , Tempo.on/2floating The value is a reading of a clock, in no zone. Tempo.floating?/1zoned The value is in a named zone or carries a shift. Tempo.zoned?/1 , Tempo.in_zone/2zone A named time zone, written as an RFC 9557 suffix ([Europe/Paris]). Tempo.shift_zone/2shift A fixed offset from UTC written with a value (+02:00). Also the verb: to move a value by a duration. Tempo.shift/3reading What a zone's clock shows. Tempo.ZoneErrora reading the clock skips A reading no moment has, on the day the clock goes forward. It is refused. Tempo.ZoneErrora reading the clock shows twice A reading two moments have, on the day the clock goes back. It is the first unless a shift is written with it. Tempo.in_zone/2calendar A module that implements Calendar , in which a value's units are counted. Never a CLDR calendar type. Tempo.to_calendar/2calendar of weeks A calendar whose year is a whole number of weeks and whose months are four or five of them. Its dates are a year, a month and a day, as any calendar's are, and a week date written for it is placed in its own weeks. Calendrical.ISOWeekterritory A CLDR territory code (:AU, :SA), which decides the weekend and the first day of the week. Never "region". Tempo.Territory
Several values at once Term Meaning Where set Several values written as one: all of them ({…}), or one of them ([…]). ISO 8601-2 §6 member One value of a set, or one span of an interval set. Tempo.IntervalSet.members/1range The values from one to another within a set ({1..5}). ISO 8601-2 §6 interval set A set of all its members, each a span: what the set operations and to_interval/2 of several spans answer. Tempo.IntervalSetsingular, plural An expression that names one span, or several: a value with a set or a mask in a unit, a set, a recurrence. Tempo.members/1covered The time at least one member of an interval set holds. Tempo.duration/1 , Tempo.IntervalSet.covered/2slot A bookable piece of free time. Tempo.IntervalSet.slots/3unspecified digits Digits written as X: 202X is some year of the 2020s. ISO 8601-2 §4.6 mask A unit that holds unspecified digits. ISO 8601-2 §4.6 group A run of a unit's values counted in equal parts: 2G3MU is the second group of three months. ISO 8601-2 §5 qualification A mark that a value is uncertain (?), approximate (~) or both (%). ISO 8601-2 §4.5 margin of error A value with a stated error (2018±2Y). guides/uncertain-dates.mdsignificant digits How many of a year's digits are known (1950S2). ISO 8601-2 §4.4.3
Recurrences Term Meaning Where recurrence A span repeated at a cadence (R5/2026-06-15/P1W). ~o"R5/2026-06-15/P1W", Tempo.RRule.parse/2start The first value a recurrence counts from. ISO 8601 cadence The duration from one period of a recurrence to the next. ISO 8601-1 §5.6 period The span a recurrence steps to, one cadence long. Tempo.select/3occurrence One span a recurrence gives. Tempo.to_interval/2repeat rule The selection a recurrence applies in each period (F…). ISO 8601-2's term. ISO 8601-2 §13 selection The parts of a period that are taken (L…N): the 15th, the Mondays, 09:00. ISO 8601-2's term. ISO 8601-2 §12 part One unit of a selection or of an RRULE: a month, a weekday, a position. Tempo.RRuleposition Which of the values a selection has picked is kept: the first, the last (I, RFC 5545's BYSETPOS). ISO 8601-2 §12.9 window A span that limits what is taken: the :within option's, and the span a selection opens from each date it picks. :within, ISO 8601-2 §12.10:withinThe window whose overlapping occurrences are kept. Tempo.to_interval/2recurrence set Recurrences and dates held together, with the dates left out. Tempo.RecurrenceSetevent A day a rule computes rather than counts, such as Easter. Tempo.Event
Relating and comparing Term Meaning Where relation Which of Allen's thirteen relations holds between two spans. Tempo.relation/2 , Tempo.Allenbefore, after The spans share no instant and one is earlier. The everyday sense: a meeting that ends at 12:00 is before a lunch at 12:00. Tempo.before?/2 , Tempo.after?/2adjacent One span ends where the other starts. Tempo.adjacent?/2overlaps The spans share an instant. Tempo.overlaps?/3within, contains The whole of one span is inside the other. Tempo.within?/2 , Tempo.contains?/3disjoint The spans share no instant. Tempo.disjoint?/3certainly, possibly Whether a relation holds for every reading of an uncertain value, or for some. Tempo.certainly?/3 , Tempo.possibly?/3 , Tempo.certainty/3compare Order two values as :lt, :eq or :gt, for sorting. Tempo.compare/3at least, at most, exactly How a span's length stands to a duration. Tempo.at_least?/2
What is done to a value Term Meaning Where read Turn text into a value. Tempo.from_iso8601/2 , Tempo.parse/2profile The kind of expression a text is declared to be when it is read: a date, a time, an interval. :profile of Tempo.from_iso8601/2write Turn a value into ISO 8601 text. Tempo.to_iso8601/1show Turn a value into a locale's words. Tempo.to_string/2explain Say in English what a value means. Tempo.explain/1convert Turn a value into another kind: its span, its occurrences, an Elixir date. Tempo.to_interval/2 , Tempo.to_date/1walk Take a span's values one after another. Enum , Tempo.walk/2count How many of a unit an expression holds: the values a walk gives, counted. Tempo.count/3select Pick, from a base, the values a selector names. Tempo.select/3selector What select/3 selects by: a value with no year, a selection, the workdays. Tempo.select/3shift Move a value by a duration. Tempo.shift/3truncate, round Write a value at a coarser unit: the one it starts in, or the nearer one. Tempo.trunc/2 , Tempo.round/2extend Write a value by the unit below its own. Tempo.extend/2 , Tempo.at_resolution/2union, intersection, difference, complement The set operations, over the time spans cover. Tempo.union/2refuse Return a named error rather than a guess. {:error, exception}not built What Tempo knows it does not answer yet, refused by name. Tempo.ConversionErrorleap second A second the IERS has added at the end of a UTC day. No value, and a fact about a span. Tempo.LeapSeconds
Errors A function that can fail returns {:error, exception}, and its ! form, a predicate and a walk raise the same exception. Each says in its message what was asked, of what, and what to do instead.
Error Meaning Reasons Tempo.ParseErrorA text that is not ISO 8601 as Tempo reads it. It says where the reading stopped. Tempo.InvalidDateErrorA text that is well formed and names no date or time: a thirteenth month, the 30th of February, an event no resolver knows. :unit names the unit at faultTempo.ZoneErrorA zone Tempo cannot use. :unknown, a name the database lacks; :gap, a reading the zone's clock skipsTempo.FrameErrorTwo expressions that share no frame to be related or combined on, or one in the wrong frame for what was asked. :floating_and_zoned, :needs_a_year, :cycles, :open, :several, :zoned, :floatingTempo.IntervalEndpointsErrorEnds that make no interval. :order, :calendars, :zones, :not_valuesTempo.ConversionErrorAn expression that has no form in what was asked for. :unbounded, a recurrence with no end and no window; :needs_a_year; :open; :one_of; :too_many_values; :season; {:no_rrule, why}; :not_an_elixir_valueTempo.Iso8601EncodeErrorAn expression ISO 8601 has no text for: a set read from a stream, a value in a calendar no name reads back to, a member with conditions on the others of its set. :lazy_set, {:calendar, module}, :conditionsTempo.InvalidCalendarErrorA calendar Tempo cannot name or use. ArgumentErrorAn argument of another kind than the function takes: an option it does not have, a unit that is none.
Days of work Notations Term Meaning Where ISO 8601 The standard Tempo reads and writes, Parts 1 and 2. Tempo.from_iso8601/2extended format A date written with separators (2026-06-15). ISO 8601-1 basic format A date written without them (20260615). ISO 8601-1 explicit form A date written with a designator after each unit (2026Y6M15D), the form Tempo writes. ISO 8601-2 §7 week date A date written by its week and its day of the week (2026-W25-3). ISO 8601-1 ordinal date A date written by its day of the year (2026-166). ISO 8601-1 EDTF The Extended Date/Time Format, now ISO 8601-2's uncertain and unspecified dates. guides/uncertain-dates.mdIXDTF RFC 9557's suffix, which names a zone or a calendar ([Europe/Paris], [u-ca=hebrew]), written once after the whole expression. RFC 9557 RRULE RFC 5545's recurrence rule, read into the same recurrence an ISO 8601 rule is. Tempo.RRule.parse/2iCalendar, JSCalendar The calendar formats of RFC 5545 and RFC 8984. Tempo.ICal , Tempo.JSCalendar