Arke.Utils.DatetimeHandler (Arke v0.7.0)

Copy Markdown View Source

Parsing, formatting and arithmetic helpers for the temporal parameter types.

Every value handled here is UTC. Datetime strings are accepted either with an explicit offset or without one, in which case they are read as UTC.

Summary

Functions

after?(first_date, second_date)

before?(first_date, second_date)

format(value, format \\ "{ISO:Extended}")

format!(value, format \\ "{ISO:Extended}")

from_unix(s, unit \\ :second)

now(atom)

parse_date(value, only_value \\ false)

parse_datetime(value, only_value \\ false)

parse_time(value, only_value \\ false)

shift_date(opts)

shift_date(date, opts)

shift_datetime(opts)

shift_datetime(datetime, opts)