Closed bernhold closed 2 years ago
Fixed so that the end-date is used if it exists.
Still want to test more carefully as to exactly how the date comparison works right around the end-date. We don't want a rebuild of the site on the day of a tutorial to move it to the past list. We want it to happen after the whole end-date day is over.
I think I've finally got this. When date
is handed a date (no time), it takes it as 12:00:00am UTC on that date. We need to get to the end of the date, and we really want it to be the end of the date anywhere on earth. So we add 36 hours to the date returned by the date
function for use in comparisons with now
.
The main index.md divides events into upcoming (scheduled or planned) or past based on the event date. It really should be the end-date, if there is one, with the date as the fallback.
Also, the comparison is with the time the site is built. Depending on the time (and time zone) of the event, and the time the site is built, it is possible that an in-progress or near future event would be designated as past. All the more so since the event date (or end date) is a day only. We've had to separate the time specification to avoid Jekyll forcing it into the site's time zone.
Perhaps we should be adjusting the date comparisons within the code to ensure we don't prematurely declare events to be past. Or perhaps we should just plan our rebuilds after the date has passed anywhere on earth.