Use time with datetime for scrobble at element
This commit is contained in:
@@ -62,4 +62,10 @@ defmodule MusicLibraryWeb.StatsLive.Index do
|
||||
_other -> ""
|
||||
end
|
||||
end
|
||||
|
||||
defp format_scrobbled_at_uts(uts) do
|
||||
uts
|
||||
|> DateTime.from_unix!()
|
||||
|> DateTime.to_iso8601()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -89,9 +89,12 @@
|
||||
<%= track.title %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="whitespace-nowrap text-right text-xs sm:text-sm text-zinc-500 dark:text-zinc-400">
|
||||
<time
|
||||
datetime={format_scrobbled_at_uts(track.scrobbled_at_uts)}
|
||||
class="whitespace-nowrap text-right text-xs sm:text-sm text-zinc-500 dark:text-zinc-400"
|
||||
>
|
||||
<%= track.scrobbled_at_label %>
|
||||
</div>
|
||||
</time>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user