Timedot (Timedot v0.1.0) View Source

Documentation for Timedot.

Link to this section Summary

Functions

Converts IR to Timedot, stripping comments and normalizing quantities. If a time item has no associated year in the IR, supplemental_year is used.

Parse a timedot string.

Parse a timedot line without an explicit date.

Convert to string.

Link to this section Types

Specs

t() :: %Timedot{ir: Timedot.IR.t(), items: [Timedot.Item.t()]}

Link to this section Functions

Link to this function

from_ir(ir, supplemental_year)

View Source

Specs

from_ir(ir :: Timedot.IR.t(), supplemental_year :: integer()) :: [
  Timedot.Item.t()
]

Converts IR to Timedot, stripping comments and normalizing quantities. If a time item has no associated year in the IR, supplemental_year is used.

Specs

parse(String.t()) :: {:ok, t()} | {:error, String.t()}

Parse a timedot string.

If year is missing from an entry, the current year will be used instead. See parse_line/2 to parse just a single entry line.

Specs

parse(String.t(), integer()) :: {:ok, t()} | {:error, String.t()}

Specs

parse_line(String.t(), :calendar.date()) ::
  {:ok, Timedot.Item.t() | nil} | {:error, String.t()}

Parse a timedot line without an explicit date.

Specs

to_string(t()) :: String.t()

Convert to string.