2020-01-26 20:36:50 +00:00
|
|
|
defmodule Mobilizon.Web.EmailView do
|
|
|
|
use Mobilizon.Web, :view
|
2019-09-30 16:18:04 +00:00
|
|
|
|
2021-10-15 13:58:49 +00:00
|
|
|
alias Mobilizon.Service.Address
|
2021-06-22 11:15:21 +00:00
|
|
|
alias Mobilizon.Service.DateTime, as: DateTimeRenderer
|
2020-01-26 20:36:50 +00:00
|
|
|
import Mobilizon.Web.Gettext
|
2021-10-15 13:58:49 +00:00
|
|
|
import Mobilizon.Service.Metadata.Utils, only: [process_description: 1]
|
2019-10-01 11:08:09 +00:00
|
|
|
|
2021-06-22 11:15:21 +00:00
|
|
|
defdelegate datetime_to_string(datetime, locale \\ "en", format \\ :medium),
|
|
|
|
to: DateTimeRenderer
|
2020-02-18 07:57:00 +00:00
|
|
|
|
2021-06-22 11:15:21 +00:00
|
|
|
defdelegate datetime_to_time_string(datetime, locale \\ "en", format \\ :short),
|
|
|
|
to: DateTimeRenderer
|
2020-11-16 17:28:52 +00:00
|
|
|
|
2021-10-15 13:58:49 +00:00
|
|
|
defdelegate datetime_to_date_string(datetime, locale \\ "en", format \\ :short),
|
|
|
|
to: DateTimeRenderer
|
|
|
|
|
2021-06-22 11:15:21 +00:00
|
|
|
defdelegate datetime_tz_convert(datetime, timezone), to: DateTimeRenderer
|
|
|
|
defdelegate datetime_relative(datetime, locale \\ "en"), to: DateTimeRenderer
|
2021-10-15 13:58:49 +00:00
|
|
|
defdelegate render_address(address), to: Address
|
|
|
|
defdelegate is_same_day?(one, two), to: DateTimeRenderer
|
2018-10-11 15:37:39 +00:00
|
|
|
end
|