Skip to content

Commit

Permalink
Add era variant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Jul 6, 2024
1 parent a173236 commit 04ad8ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/cldr_dates_times_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,9 @@ defmodule Cldr.DatesTimes.Test do
assert Cldr.DateTime.to_string(date_time, format: :long, style: :at, locale: :fr) ==
{:ok, "8 septembre 2023 à 15:50:00 UTC"}
end

test "Era variants" do
assert {:ok, "2024/7/6 CE"} = Cldr.Date.to_string(~D[2024-07-06], era: :variant, format: "y/M/d G")
assert {:ok, "2024/7/6 AD"} = Cldr.Date.to_string(~D[2024-07-06], format: "y/M/d G")
end
end

0 comments on commit 04ad8ba

Please sign in to comment.