by clemens (29.09.2022)

Hugo .Date.Format strings have more meaning than I thought


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 in nearly every other language. Correct would be .Date.Format "Monday, 02.01.2006".


  • 02 means day of month
  • 01 means month
  • 2006 means year

See here for more details.