LunchDevCommunity / community-calendar

📅 Community calendar for our Discord server, built with love and Eleventy.
https://events.lunch.dev
15 stars 12 forks source link

Add local date conversion to events #101

Closed chantastic closed 3 years ago

chantastic commented 3 years ago

got back from lunch and started thinking.

if we use a <time> element, we can use the first class attribute datetime="{{ event.date | asISOString }}". if we do this we're both providing semantics to the browser AND can use that ISO string to instead of a bespoke data-* attr.

super cool! i'm going to work it out as an amendment to this PR.

BenDMyers commented 3 years ago

got back from lunch and started thinking.

if we use a <time> element, we can use the first class attribute datetime="{{ event.date | asISOString }}". if we do this we're both providing semantics to the browser AND can use that ISO string to instead of a bespoke data-* attr.

super cool! i'm going to work it out as an amendment to this PR.

I love this idea!

chantastic commented 3 years ago

easy-peasy: https://github.com/LunchDevCommunity/community-calendar/pull/101/commits/18e459ff59fac117826f04be9ecf5358b5d9aeb6

chantastic commented 3 years ago

updated event.html to use same localization utility function