Tempo.Explain (Tempo v2.1.0)

Copy Markdown View Source

A description of an expression in prose: what it is, the time it covers, the frame it is in and what walking it gives.

Tempo.explain/1 joins the lines; lines/1 gives them one by one for a caller that styles them.

Summary

Functions

The lines that describe an expression.

Functions

lines(duration)

@spec lines(term()) :: [String.t()]

The lines that describe an expression.

Arguments

Returns

  • A list of strings, the first saying what the expression is.

Examples

iex> Tempo.Explain.lines(~o"2026-06-15")
[
  "A value written to the day: Jun 15, 2026.",
  "It covers 2026Y6M15D through 2026Y6M15D.",
  "It is floating: a reading of a clock in no zone.",
  "Walking it gives its hours."
]