Quantum v2.3.4 Quantum.DateLibrary behaviour View Source

This Behaviour offers Date Library Independant integration of helper functions.

This behaviour is considered internal. Breaking Changes can occur on every release.

Make sure your implementation passes Quantum.DateLibraryTest. Otherwise unexpected behaviour can occur.

Link to this section Summary

Functions

Convert Date to TZ

Convert Date to Utc

Callbacks

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

Convert Date to TZ

Link to this function to_utc!(date, tz) View Source
to_utc!(NaiveDateTime.t(), :utc | binary()) :: NaiveDateTime.t() | no_return()
to_utc!(NaiveDateTime.t(), :utc | binary()) :: NaiveDateTime.t() | no_return()

Convert Date to Utc

Link to this section Callbacks

Link to this callback dependency_application() View Source
dependency_application() :: atom() | nil

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

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.

Convert NaiveDateTime in UTC to NaiveDateTime in given tz.

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