analytics/lib/plausible_web/views/billing_view.ex

13 lines
297 B
Elixir
Raw Normal View History

2019-09-02 14:29:19 +03:00
defmodule PlausibleWeb.BillingView do
use PlausibleWeb, :view
def present_date(date) do
Date.from_iso8601!(date)
|> Timex.format!("{D} {Mshort} {YYYY}")
end
2021-05-13 12:16:31 +03:00
def present_currency("USD"), do: "$"
def present_currency("EUR"), do: ""
def present_currency("GBP"), do: "£"
2019-09-02 14:29:19 +03:00
end