{{ range where .Data.Pages "Section" "event" }}
{{ if ge $.Params.expiration.Unix .Now.Unix }}
...
{{ end }}
{{ end }}
Absolutely nothing prints.
If I change the operator to “le” everything prints. My expectation is that event-2.md would print, but that’s not what happens.
removing the quotation marks throws an error unless this format and only this format is used: 1979-05-27T07:32:00Z
Here’s the error - I tried both date formats two and three:
ERROR: 2016/07/28 Error parsing page meta data for event/2015-09-08-adopt-a-street.md
ERROR: 2016/07/28 Near line 7 (last key parsed 'date'): Expected 'Z' in ISO8601 datetime, but found '-' instead.
ERROR: 2016/07/28 Near line 11 (last key parsed 'dateeventstart'): Expected 'Z' in ISO8601 datetime, but found '.' instead.
It probably doesn’t make much difference and I don’t think it’s relevant to this problem, but not allowing for datetime options 2 and 3 means timezones can’t be accounted for in that scenario. screenshot: https://cl.ly/2q3j2w0y170F
Lastly. I changed the event dates to the format param = 2016-10-29T09:00:00Z and articles with dates greater than .Now are still not showing. If I change the code to less than equal to (le), then they all show up in the list. I purposefully have some articles with old dates and some with future dates as a test. screenshot: https://cl.ly/1E0Y0V0o2E1w
Okay, now I feel smart. I didn’t define the params in the config. I’m going to mark this as solved and edit the name so others might avoid the mistake.