Get the day of the week extracted from an arbitrary frontmatter date

How do I get the day of the week extracted from an arbitrary frontmatter date, e.g.

eventdate:     2019-05-10

I can’t get the day of the week of the eventdate with

{{.Params.eventdate.Weekday}}

Hi @marekkowalczyk, I moved your post to a new topic, and linked/reset the bump date on the old one.

Try:

{{ (time .Params.eventdate).Weekday }}
1 Like

Works!

BTW, where can I find a systematic source of such knowledge?

Here: https://gohugo.io/functions/time/#readout

And here: https://golang.org/src/time/time.go#L127

A post was split to a new topic: Localization of time.Time values