1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-29 11:25:39 +00:00
mobilizon/lib/mobilizon_web/views/email_view.ex

13 lines
316 B
Elixir
Raw Normal View History

2019-09-17 00:45:32 +00:00
defmodule MobilizonWeb.EmailView do
use MobilizonWeb, :view
import MobilizonWeb.Gettext
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