Quantum v2.3.3 Quantum.DateLibrary.Timex View Source
timex implementation of Quantum.DateLibrary.
This behaviour is considered internal. Breaking Changes can occur on every release.
Installation
config.exs
config :quantum,
date_library: Quantum.DateLibrary.Timex
mix.exs
defp deps do
[{:quantum, "*"},
{:timex, "*"}]
end
Link to this section Summary
Functions
Gives back the required application dependency to start, if any is needed
Convert NaiveDateTime in given tz to NaiveDateTime in UTC
Convert NaiveDateTime in UTC to NaiveDateTime in given tz
Link to this section Functions
Gives back the required application dependency to start, if any is needed.
Callback implementation for Quantum.DateLibrary.dependency_application/0.
Link to this function
tz_to_utc!(date, tz)
View Source
tz_to_utc!(NaiveDateTime.t(), String.t()) :: NaiveDateTime.t() | no_return()
Convert NaiveDateTime in given tz to NaiveDateTime in UTC.
- Should raise an
InvalidDateTimeForTimezoneErrorif the time is not valid. - Should raise an
InvalidTimezoneErrorif the timezone is not valid.
Callback implementation for Quantum.DateLibrary.tz_to_utc!/2.
Link to this function
utc_to_tz!(date, tz)
View Source
utc_to_tz!(NaiveDateTime.t(), String.t()) :: NaiveDateTime.t() | no_return()
Convert NaiveDateTime in UTC to NaiveDateTime in given tz.
- Should raise an
InvalidTimezoneErrorif the timezone is not valid.
Callback implementation for Quantum.DateLibrary.utc_to_tz!/2.