mobilizon/lib/web/views/email_view.ex
Thomas Citharel 8caf1e302b
Add basic metadata to opengraph preview
Also refactor datetime & address utils

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-22 16:01:55 +02:00

16 lines
528 B
Elixir

defmodule Mobilizon.Web.EmailView do
use Mobilizon.Web, :view
alias Mobilizon.Service.DateTime, as: DateTimeRenderer
import Mobilizon.Web.Gettext
defdelegate datetime_to_string(datetime, locale \\ "en", format \\ :medium),
to: DateTimeRenderer
defdelegate datetime_to_time_string(datetime, locale \\ "en", format \\ :short),
to: DateTimeRenderer
defdelegate datetime_tz_convert(datetime, timezone), to: DateTimeRenderer
defdelegate datetime_relative(datetime, locale \\ "en"), to: DateTimeRenderer
end