From b2f2155682b2f600d7898e4eb3f9024d78aded3b Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Thu, 8 Jun 2023 14:15:31 -0700 Subject: [PATCH] chore: date formatting --- config/dateFilters.js | 3 +++ src/_includes/now.liquid | 3 ++- src/_includes/post.liquid | 2 +- src/index.html | 2 +- src/tagList.md | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/dateFilters.js b/config/dateFilters.js index 64dc82ba..172a628f 100644 --- a/config/dateFilters.js +++ b/config/dateFilters.js @@ -1,6 +1,9 @@ const { DateTime } = require('luxon') module.exports = { + readableDate: (date) => { + return DateTime.fromISO(date).toFormat('LLLL d, yyyy') + }, dateForFeed: (date) => { return new Date(date).toISOString() }, diff --git a/src/_includes/now.liquid b/src/_includes/now.liquid index 0ae4155d..ef311dc3 100644 --- a/src/_includes/now.liquid +++ b/src/_includes/now.liquid @@ -97,8 +97,9 @@ layout: main