From 4d252387fbf034a66e2fd4c713912de0dd2cb048 Mon Sep 17 00:00:00 2001 From: Ava Gaiety W Date: Mon, 25 Mar 2024 14:11:44 -0500 Subject: [PATCH] localized format fix --- .eleventy.js | 3 +++ repos/ember-select-light.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.eleventy.js b/.eleventy.js index c1b2978..fdf7eb4 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -2,6 +2,7 @@ const Nunjucks = require('nunjucks'); const dayjs = require('dayjs'); const utc = require('dayjs/plugin/utc') const timezone = require('dayjs/plugin/timezone') +const localizedFormat = require('dayjs/plugin/localizedFormat') const hljs = require('highlight.js/lib/common'); const { setup } = require('highlightjs-glimmer'); const markdownit = require('markdown-it'); @@ -11,7 +12,9 @@ const expectedInputFormat = 'YYYY-MM-DD'; const defaultOuputFormat = 'LL'; dayjs.extend(utc); dayjs.extend(timezone); +dayjs.extend(localizedFormat); function dayjsFilter(date, format = defaultOuputFormat) { + console.log(dayjs(date, expectedInputFormat).utc().format(format)) return dayjs(date, expectedInputFormat).utc().format(format); } diff --git a/repos/ember-select-light.md b/repos/ember-select-light.md index 876d7b7..51c3f84 100644 --- a/repos/ember-select-light.md +++ b/repos/ember-select-light.md @@ -5,7 +5,7 @@ title: ember-select-light description: The simplest Ember `