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

#1

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}}
[SOLVED] The Day of Week translation
#2

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

#3

Try:

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

Works!

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

#5

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

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