DarkMatter.DateTimes (DarkMatter v1.1.4) View Source
Datetime Utils
Link to this section Summary
Functions
Casts a stringable/0
into a DateTime.t/0
Transform a DateTime.t/0
into a string.
Returns the current utc time
Transform a stringable/0
into a string.
Link to this section Types
Specs
stringable() :: nil | (unix :: integer()) | String.t() | DateTime.t() | NaiveDateTime.t()
Link to this section Functions
Specs
cast_datetime(stringable()) :: nil | DateTime.t()
Casts a stringable/0
into a DateTime.t/0
Raises ArgumentError
if a given DateTime.t/0
isn't valid.
Specs
from_iso8601!(String.t()) :: DateTime.t()
Transform a DateTime.t/0
into a string.
Raises ArgumentError
if a given DateTime.t/0
isn't valid.
Specs
now!() :: DateTime.t()
Returns the current utc time
Specs
to_string(stringable()) :: nil | String.t()
Transform a stringable/0
into a string.
Raises ArgumentError
if a given binary isn't a valid DateTime.t/0
.