timely v0.3.0 Timely
Provides functions for converting, comparing and shifting Elixir date & times.
Link to this section Summary
Functions
Converts common date time like date structures to other common date time like data structures
Initializes a DateTime
Link to this section Types
Link to this type
date_or_time_like()
date_or_time_like() :: Date.t() | DateTime.t() | NaiveDateTime.t() | Ecto.Date.t() | Ecto.DateTime.t() | String.t()
Link to this type
datetime_tuple()
datetime_tuple() :: {{integer(), integer(), integer()}, {integer(), integer(), integer()}}
A known spec or a format string.
A valid time zone.
Link to this section Functions
Link to this function
after?(dt1, dt2)
Link to this function
ago(dt \\ utc(), units, scale)
Link to this function
as(error, format_or_spec)
as(date_or_time_like() | nil, spec_or_format()) :: date_or_time_like() | nil
Converts common date time like date structures to other common date time like data structures.
Link to this function
before?(dt1, dt2)
Link to this function
before_or_on?(dt1, dt2)
Link to this function
equal?(dt1, dt2)
Link to this function
from_now(dt \\ utc(), units, scale)
Link to this function
in_timezone(datetime, timezone)
Link to this function
new_datetime(arg, microseconds \\ {0, 6}, time_zone \\ "Etc/UTC")
new_datetime(datetime_tuple(), microseconds(), time_zone()) :: DateTime.t()
Initializes a DateTime.
Link to this function
now_in_timezone()
Link to this function
now_in_timezone(timezone)
Link to this function
on_or_after?(dt1, dt2)
Link to this function
utc()
Link to this function
utc_today()