TzWord v0.4.0 TzWorld.Backend behaviour View Source

Defines the callbacks for the TzWorld.Backend behaviour

Link to this section Summary

Types

A point

Latitude in degrees

Longitude in degrees

Callbacks

Returns all timezones at a specified point

Reloads the (potentially updated) timezone data

Returns the time zone at a specified point

Link to this section Types

A point

Link to this type

lat()

View Source
lat() :: -90..90

Latitude in degrees

Link to this type

lng()

View Source
lng() :: -180..180

Longitude in degrees

Link to this section Callbacks

Link to this callback

all_timezones_at(arg1)

View Source
all_timezones_at(Geo.Point.t()) :: {:ok, [String.t()]} | {:error, atom()}

Returns all timezones at a specified point

Link to this callback

reload_timezone_data()

View Source
reload_timezone_data() :: {:ok, term()}

Reloads the (potentially updated) timezone data

Link to this callback

timezone_at(geo)

View Source
timezone_at(geo()) :: {:ok, String.t()} | {:error, atom()}

Returns the time zone at a specified point