Skip to content

Commit

Permalink
Fix Cldr.validate_territory_subdivision/1 and release ex_cldr 2.24.0-…
Browse files Browse the repository at this point in the history
…rc.3
  • Loading branch information
kipcole9 committed Oct 19, 2021
1 parent 717312d commit 8638fd0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Cldr v2.24.0-rc.3

This is the changelog for Cldr v2.24.0-rc.3 released on October 18th, 2021. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr/tags)

### Bug Fixes

* `Cldr.validate_territory_subdivision/1` was case sensitive and didn't correctly handle atoms and binaries. Now fixed. Required to support `ex_cldr_territories` properly.

## Cldr v2.24.0-rc.2

This is the changelog for Cldr v2.24.0-rc.2 released on October 18th, 2021. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr/tags)
Expand Down
6 changes: 3 additions & 3 deletions lib/cldr.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1528,9 +1528,9 @@ defmodule Cldr do
validate_territory(territory)
end

defp validate_subdivision(subdivision) when is_binary(subdivision) do
case Map.fetch(known_territory_subdivision_containment(), subdivision) do
{:ok, _} -> {:ok, subdivision}
defp validate_subdivision(subdivision) do
case Cldr.Validity.Subdivision.validate(subdivision) do
{:ok, subdivision, status} when status in [:regular, :deprecated] -> {:ok, subdivision}
_ -> {:error, unknown_territory_error(subdivision)}
end
end
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Cldr.Mixfile do
use Mix.Project

@version "2.24.0-rc.2"
@version "2.24.0-rc.3"

def project do
[
Expand Down

0 comments on commit 8638fd0

Please sign in to comment.