tox v0.1.1 Tox

Some structs and functions to work with dates, times, durations, periods, and intervals.

Link to this section Summary

Types

Boundaries specifies whether the start and end of an interval are included or excluded.

An amount of time with a specified unit e.g. {second: 500}.

Units related to dates and times.

Link to this section Types

Link to this type

boundaries()

Specs

boundaries() :: :closed | :left_open | :right_open | :open

Boundaries specifies whether the start and end of an interval are included or excluded.

  • :open: start and end are excluded
  • :closed: start and end are included
  • :left_open: start is excluded and end is included
  • :right_open: start is included and end is excluded

Specs

duration() :: {unit(), integer()}

An amount of time with a specified unit e.g. {second: 500}.

Specs

unit() ::
  :year | :month | :week | :day | :hour | :minute | :second | :microsecond

Units related to dates and times.