[SOLVED] .Date.Format not adding ordinals

You can use the humanize function:

this:

{{ .Date.Format "January 2, 2006" }}

returns “January 2, 2006”

this:

{{ .Date.Format "January" }}
{{ .Date.Format "2" | humanize}},
{{ .Date.Format "2006" }}

returns “January 2nd, 2006”

6 Likes