Format dates using CommonAPI utils.
This commit is contained in:
parent
918e1353f6
commit
93e9c0cedf
|
@ -28,4 +28,9 @@ def emoji_for_user(%User{} = user) do
|
||||||
def fetch_media_type(%{"mediaType" => mediaType}) do
|
def fetch_media_type(%{"mediaType" => mediaType}) do
|
||||||
Utils.fetch_media_type(@media_types, mediaType)
|
Utils.fetch_media_type(@media_types, mediaType)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def format_date(date) do
|
||||||
|
{:ok, date, _} = DateTime.from_iso8601(date)
|
||||||
|
Pleroma.Web.CommonAPI.Utils.format_asctime(date)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="activity" <%= if @selected do %> id="selected" <% end %>>
|
<div class="activity" <%= if @selected do %> id="selected" <% end %>>
|
||||||
<p class="pull-right">
|
<p class="pull-right">
|
||||||
<%= link @published, to: @link, class: "activity-link" %>
|
<%= link format_date(@published), to: @link, class: "activity-link" %>
|
||||||
</p>
|
</p>
|
||||||
<%= render("_user_card.html", %{user: @user}) %>
|
<%= render("_user_card.html", %{user: @user}) %>
|
||||||
<div class="activity-content">
|
<div class="activity-content">
|
||||||
|
|
Loading…
Reference in New Issue