Hi!
I’m trying to figure out some way to check if .Date
has the default value (0001-01-01T00:00:00Z
). I tried the following but it didn’t work:
{{ if eq .Date "0001-01-01T00:00:00Z" }}
Have you any idea?
Thanks
Hi!
I’m trying to figure out some way to check if .Date
has the default value (0001-01-01T00:00:00Z
). I tried the following but it didn’t work:
{{ if eq .Date "0001-01-01T00:00:00Z" }}
Have you any idea?
Thanks
{{ if .Date.IsZero }}
Should be what you want, I think.
Perfect. Thanks =D