DarkMatter v1.0.3 DarkMatter.DateTimes View Source
Datetime Utils
Link to this section Summary
Functions
Casts a stringable/0
into a DateTime
Transform a DateTime
into a string.
Returns the current utc time
Transform a stringable/0
into a string.
Link to this section Types
Specs
stringable() :: nil | 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
Raises ArgumentError
if a given DateTime
isn't valid.
Specs
from_iso8601!(String.t()) :: DateTime.t()
Transform a DateTime
into a string.
Raises ArgumentError
if a given DateTime
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
.