You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Until #79, we were validating the event date before building them.
I'm opening this issue to hold the implementation for future discussion of a similar implementation:
// Some helpers to make sure our event frontmatter is :100:// Make events have an eleventy and js-yaml-friendly standardized date format of:// date: 2021-01-11T21:00:00-08:00// See: https://www.11ty.dev/docs/dates/#setting-a-content-date-in-front-matter// Note: we make sure the parsed date is valid, then check the actual raw input format to make sure we have consistency// const dateFormatRegex = /(date:)\s[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z/gm;constisValidDate=(date,rawInputContent)=>{!Number.isNaN(Date.parse(date))&&rawInputContent.match(dateFormatRegex);};
The text was updated successfully, but these errors were encountered:
Until #79, we were validating the event date before building them.
I'm opening this issue to hold the implementation for future discussion of a similar implementation:
The text was updated successfully, but these errors were encountered: