by
clemens
(29.09.2022)
Hugo .Date.Format strings have more meaning than I thought
tl;dr
On this blog the dates were formatted incorrectly, i.e. 2022-08-30
would be printed as 30-88-022
. The solution was that
the format strings look like they are just some random date, i.e. .Date.Format "Monday, 01.11.2006"
, but actually the values
for date, month and year are hardcoded like dd.mm.yyyy
in nearly every other language. Correct would be .Date.Format "Monday, 02.01.2006"
.
Where
02
means day of month01
means month2006
means year
See here for more details.