mobilizon.chapril.org-mobil.../lib/mobilizon_web/views/email_view.ex
Thomas Citharel 5fd38ace2e
Notifications on event update
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-09-30 19:01:46 +02:00

11 lines
285 B
Elixir

defmodule MobilizonWeb.EmailView do
use MobilizonWeb, :view
def datetime_to_string(%DateTime{} = datetime, locale \\ "en") do
with {:ok, string} <-
Cldr.DateTime.to_string(datetime, Mobilizon.Cldr, format: :medium, locale: locale) do
string
end
end
end