An Elixir library for compiling enriched time zone information.
Add zonex to your list of dependencies in mix.exs. You will also need to install and configure the ex_cldr library with the ex_cldr_time_zone_names plugin, since Zonex requires a CLDR backend for compiling time zone names.
def deps do
[
{:zonex, "~> 0.6.0"},
# Additional required dependencies
{:ex_cldr, "~> 2.33"},
{:ex_cldr_time_zone_names, "~> 0.1"},
# ...
]
endIn your application, configure your CLDR backend module:
defmodule MyApp.Cldr do
use Cldr,
providers: [
Cldr.TimeZoneName,
# ...
],
# ...
endThen, let Zonex know what CLDR backend module to use in your application config:
# config/config.exs
config :zonex, cldr_backend: MyApp.Cldr