AVGVSTVS96 / astroSite

Built with Astro and TailwindCSS, this MPA portfolio & blog site is version 3 of my personal website, my first MPA.
https://astrosite-aid.pages.dev/
GNU Affero General Public License v3.0
0 stars 0 forks source link

Extract `formatDate` function to it's own file, allow format options to be set when called #266

Closed AVGVSTVS96 closed 6 months ago

AVGVSTVS96 commented 6 months ago

Should be usable like this:

formatDate(post.data.pubDate)} // December 26, 2023
formatDate(post.data.pubDate, {month: 'short',}) // Dec 26, 2023
formatDate(post.data.pubDate, {month: 'numeric',}) // 12/26/2023
formatDate(post.data.pubDate, {weekday: 'long', month: 'short'}) // Tuesday, Dec 26, 2023
linear[bot] commented 6 months ago

BAS-89 Extract `formatDate` function to it's own file, allow format options to be set when called