mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-28 19:06:23 +00:00
a84cfb5910
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
12 lines
316 B
Elixir
12 lines
316 B
Elixir
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
|