date/time

created onAugust 17, 2025

dateFormat works only for secific date

the following works and renders on August 17th, 2025, the string :

{{ now | dateFormat "2006-01-02" }}

However, if the year in the format string is changed in the code above, i.e. to , the code renders on August 17th, 2025, the string which is obviously not a valid date.

For date components, only the values listed in the HUGO documentation are valid. I.e. “02” is valid for day of the month, “03” isn’t.
x