Closed woylie closed 1 year ago
Ouch, that's not good. My apologies. Can you please confirm which locale is in effect? I'll work on this right away.
It's ja
. But I'm not sure right now whether that's a bug indeed, or whether the compiler is just stubborn.
It seems to work now after deleting the _build
folder and the locale data file.
Hmmm, I'm seeing the following:
iex> MyApp.Cldr.Date.Interval.to_string!(~D[2022-11-19], ~D[2022-12-11], format: :medium, locale: "ja")
"2022年11月19日~12月11日"
But I do get the error if I use an older version of ex_cldr
:
iex> MyApp.Cldr.Date.Interval.to_string!(~D[2022-11-19], ~D[2022-12-11], format: :medium, locale: "ja")
** (CaseClauseError) no case clause matching: :error
(ex_cldr_dates_times 2.13.3) lib/cldr/interval/date.ex:644: Cldr.Date.Interval.to_string!/4
iex:2: (file)
So my working assumption is that you're on Linux, and for reasons I still can't work out, the old locale files are persisting even when a new version of ex_cldr
is installed. I will fix this in April with CLDR 43 by versioning the locale data files.
I am on macOS, actually.
Arrrghhhh, that's even worse (from my perspective) since I do all my work on Macs and this has never been an issue for me other than on isolated Linux instances. Would you mind pasting the configuration you have for MyAppWeb.Cldr
? I'm still trying to reproduce how on earth this can happen.
Sure, this is my backend module:
defmodule MyAppWeb.Cldr do
@moduledoc false
use Cldr,
locales: ["ja", "en"],
gettext: MyAppWeb.Gettext,
otp_app: :my_app_web,
providers: [Cldr.Calendar, Cldr.DateTime, Cldr.List, Cldr.Number, Cldr.Unit]
end
This works in ex_cldr_dates_times 2.13.2:
However, in version 2.13.3, I'm getting this:
ex_cldr version: 2.36.0