Introduce group basic federation, event new page and notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -3,9 +3,16 @@ defmodule Mobilizon.Web.EmailView do
|
||||
|
||||
import Mobilizon.Web.Gettext
|
||||
|
||||
def datetime_to_string(%DateTime{} = datetime, locale \\ "en") do
|
||||
def datetime_to_string(%DateTime{} = datetime, locale \\ "en", format \\ :medium) do
|
||||
with {:ok, string} <-
|
||||
Cldr.DateTime.to_string(datetime, Mobilizon.Cldr, format: :medium, locale: locale) do
|
||||
Mobilizon.Cldr.DateTime.to_string(datetime, format: format, locale: locale) do
|
||||
string
|
||||
end
|
||||
end
|
||||
|
||||
def datetime_to_time_string(%DateTime{} = datetime, locale \\ "en", format \\ :hm) do
|
||||
with {:ok, string} <-
|
||||
Mobilizon.Cldr.DateTime.to_string(datetime, format: format, locale: locale) do
|
||||
string
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user