Use strftime to format date and datetimes

This commit is contained in:
Claudio Ortolina
2025-05-04 17:23:33 +01:00
parent 67714a1191
commit 0952bcd399
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -227,7 +227,7 @@ defmodule MusicLibrary.Records.Record do
end
end
def format_as_date(purchased_at) do
"#{purchased_at.day}/#{purchased_at.month}/#{purchased_at.year}"
def format_as_date(dt) do
Calendar.strftime(dt, "%d/%m/%Y")
end
end