Quantum v2.3.4 Quantum.DateLibrary.Calendar View Source

calendar 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.Calendar

mix.exs

defp deps do
  [{:quantum, "*"},
   {:calendar, "*"}]
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

Link to this function dependency_application() View Source
dependency_application() :: :calendar

Gives back the required application dependency to start, if any is needed.

Callback implementation for Quantum.DateLibrary.dependency_application/0.

Convert NaiveDateTime in given tz to NaiveDateTime in UTC.

  • Should raise an InvalidDateTimeForTimezoneError if the time is not valid.
  • Should raise an InvalidTimezoneError if the timezone is not valid.

Callback implementation for Quantum.DateLibrary.tz_to_utc!/2.

Convert NaiveDateTime in UTC to NaiveDateTime in given tz.

  • Should raise an InvalidTimezoneError if the timezone is not valid.

Callback implementation for Quantum.DateLibrary.utc_to_tz!/2.