Packages
tz_extra
0.17.0
0.45.0
0.44.0
0.43.0
0.42.0
0.41.0
0.40.0
0.39.0
0.38.0
0.37.0
0.36.0
0.35.0
0.34.0
0.33.0
0.32.0
0.31.0
0.30.0
0.29.0
0.28.0
0.27.0
0.26.0
0.25.0
0.24.0
0.23.0
0.22.1
0.22.0
0.21.1
0.21.0
0.20.1
0.20.0
0.17.0
0.16.7
0.16.6
0.16.5
0.16.3
0.16.2
0.16.1
0.16.0
0.15.1
0.15.0
0.8.0
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
Time zone-related utilities
Current section
47 Versions
Jump to
Current section
47 Versions
Compare versions
6
files changed
+15
additions
-15
deletions
| @@ -185,8 +185,8 @@ Lastly, add the http client `mint` and ssl certificate store `castore` into your | |
| 185 185 | defp deps do |
| 186 186 | [ |
| 187 187 | {:castore, "~> 0.1.10"}, |
| 188 | - {:mint, "~> 1.2"}, |
| 189 | - {:tz_extra, "~> 0.16.7"} |
| 188 | + {:mint, "~> 1.3"}, |
| 189 | + {:tz_extra, "~> 0.17.0"} |
| 190 190 | ] |
| 191 191 | end |
| 192 192 | ``` |
| @@ -210,7 +210,7 @@ Add `tz_extra` for Elixir as a dependency in your `mix.exs` file: | |
| 210 210 | ```elixir |
| 211 211 | def deps do |
| 212 212 | [ |
| 213 | - {:tz_extra, "~> 0.16.7"} |
| 213 | + {:tz_extra, "~> 0.17.0"} |
| 214 214 | ] |
| 215 215 | end |
| 216 216 | ``` |
| @@ -16,10 +16,10 @@ | |
| 16 16 | {<<"name">>,<<"tz">>}, |
| 17 17 | {<<"optional">>,false}, |
| 18 18 | {<<"repository">>,<<"hexpm">>}, |
| 19 | - {<<"requirement">>,<<"~> 0.16">>}], |
| 19 | + {<<"requirement">>,<<"~> 0.17">>}], |
| 20 20 | [{<<"app">>,<<"ecto">>}, |
| 21 21 | {<<"name">>,<<"ecto">>}, |
| 22 22 | {<<"optional">>,true}, |
| 23 23 | {<<"repository">>,<<"hexpm">>}, |
| 24 24 | {<<"requirement">>,<<"~> 3.6">>}]]}. |
| 25 | - {<<"version">>,<<"0.16.7">>}. |
| 25 | + {<<"version">>,<<"0.17.0">>}. |
| @@ -62,8 +62,8 @@ defmodule TzExtra.Compiler do | |
| 62 62 | |
| 63 63 | contents = [ |
| 64 64 | quote do |
| 65 | - def database_version() do |
| 66 | - unquote(Tz.database_version()) |
| 65 | + def iana_version() do |
| 66 | + unquote(Tz.iana_version()) |
| 67 67 | end |
| 68 68 | |
| 69 69 | def get_canonical_time_zone_identifier(time_zone_identifier) do |
| @@ -4,14 +4,14 @@ defmodule TzExtra.IanaFileParser do | |
| 4 4 | import TzExtra.Helper |
| 5 5 | |
| 6 6 | def countries() do |
| 7 | - Path.join([:code.priv_dir(:tz), "tzdata#{Tz.database_version()}", "iso3166.tab"]) |
| 7 | + Path.join([:code.priv_dir(:tz), "tzdata#{Tz.iana_version()}", "iso3166.tab"]) |
| 8 8 | |> file_to_list() |
| 9 9 | |> parse_countries() |
| 10 10 | |> Enum.sort_by(&normalize_string(&1.name)) |
| 11 11 | end |
| 12 12 | |
| 13 13 | def time_zones_with_country(countries) do |
| 14 | - Path.join([:code.priv_dir(:tz), "tzdata#{Tz.database_version()}", "zone1970.tab"]) |
| 14 | + Path.join([:code.priv_dir(:tz), "tzdata#{Tz.iana_version()}", "zone1970.tab"]) |
| 15 15 | |> file_to_list() |
| 16 16 | |> parse_time_zones_with_country() |
| 17 17 | |> Enum.map(fn map -> |
| @@ -23,7 +23,7 @@ defmodule TzExtra.IanaFileParser do | |
| 23 23 | |
| 24 24 | def time_zones() do |
| 25 25 | for filename <- ~w(africa antarctica asia australasia etcetera europe northamerica southamerica)s do |
| 26 | - Path.join([:code.priv_dir(:tz), "tzdata#{Tz.database_version()}", filename]) |
| 26 | + Path.join([:code.priv_dir(:tz), "tzdata#{Tz.iana_version()}", filename]) |
| 27 27 | |> file_to_list() |
| 28 28 | |> parse_time_zones() |
| 29 29 | end |
| @@ -21,7 +21,7 @@ if Code.ensure_loaded?(Mint.HTTP) do | |
| 21 21 | |
| 22 22 | Updater.maybe_recompile() |
| 23 23 | |
| 24 | - if Tz.database_version() != TzExtra.database_version() do |
| 24 | + if Tz.iana_version() != TzExtra.iana_version() do |
| 25 25 | Logger.info("TzExtra is recompiling time zone data...") |
| 26 26 | Code.compiler_options(ignore_module_conflict: true) |
| 27 27 | Compiler.compile() |
Loading more files…