Hi everyone,
I have the following config in config.exs
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
config :wolf_cms,
ecto_repos: [WolfCms.Repo]
# Configures the endpoint
config :wolf_cms, WolfCmsWeb.Endpoint,
url: [host: "localhost"],
secret_key_base: "gsKzQFCNGujOPkFu1NH3FbAuPLnjEnmIw5vkZrEy+tS5cwsCW05lEBpeXq7q4d2y",
render_errors: [view: WolfCmsWeb.ErrorView, accepts: ~w(json)],
pubsub: [name: WolfCms.PubSub, adapter: Phoenix.PubSub.PG2]
# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]
# Use Jason for JSON parsing in Phoenix
config :phoenix, :json_library, Jason
config :ex_cldr,
default_locale: "en",
json_library: Jason
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env()}.exs"
I have the following problem after installing:
{:ex_cldr, "~> 2.0"},
{:ex_cldr_dates_times, "~> 2.0"}
The only way I get a result
WolfCms.Cldr.DateTime.to_string DateTime.utc_now, WolfCms.Cldr, format: :short
** (UndefinedFunctionError) function WolfCms.Cldr.DateTime.to_string/3 is undefined (module WolfCms.Cldr.DateTime is not available)
WolfCms.Cldr.DateTime.to_string(~U[2020-01-25 14:31:16.268454Z], WolfCms.Cldr, [format: :short]
If I use the new method for version 2 for DateTime.to_string/3
iex(1)> Cldr.DateTime.to_string DateTime.utc_now, WolfCms.Cldr, format: :short
** (UndefinedFunctionError) function WolfCms.Cldr.default_locale/0 is undefined (module WolfCms.Cldr is not available)
WolfCms.Cldr.default_locale()
(ex_cldr) lib/cldr.ex:157: Cldr.get_locale/1
(ex_cldr_dates_times) lib/cldr/datetime.ex:121: Cldr.DateTime.default_options/1
(ex_cldr_dates_times) lib/cldr/datetime.ex:102: Cldr.DateTime.to_string/3
iex(1)>
Can someone explain why this is not working properly?
Thanks