localized format fix
This commit is contained in:
parent
bfa77f37e7
commit
4d252387fb
2 changed files with 4 additions and 1 deletions
|
@ -2,6 +2,7 @@ const Nunjucks = require('nunjucks');
|
||||||
const dayjs = require('dayjs');
|
const dayjs = require('dayjs');
|
||||||
const utc = require('dayjs/plugin/utc')
|
const utc = require('dayjs/plugin/utc')
|
||||||
const timezone = require('dayjs/plugin/timezone')
|
const timezone = require('dayjs/plugin/timezone')
|
||||||
|
const localizedFormat = require('dayjs/plugin/localizedFormat')
|
||||||
const hljs = require('highlight.js/lib/common');
|
const hljs = require('highlight.js/lib/common');
|
||||||
const { setup } = require('highlightjs-glimmer');
|
const { setup } = require('highlightjs-glimmer');
|
||||||
const markdownit = require('markdown-it');
|
const markdownit = require('markdown-it');
|
||||||
|
@ -11,7 +12,9 @@ const expectedInputFormat = 'YYYY-MM-DD';
|
||||||
const defaultOuputFormat = 'LL';
|
const defaultOuputFormat = 'LL';
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
|
dayjs.extend(localizedFormat);
|
||||||
function dayjsFilter(date, format = defaultOuputFormat) {
|
function dayjsFilter(date, format = defaultOuputFormat) {
|
||||||
|
console.log(dayjs(date, expectedInputFormat).utc().format(format))
|
||||||
return dayjs(date, expectedInputFormat).utc().format(format);
|
return dayjs(date, expectedInputFormat).utc().format(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ title: ember-select-light
|
||||||
description: The simplest Ember `<select>` there is.
|
description: The simplest Ember `<select>` there is.
|
||||||
date: 2020-11-05
|
date: 2020-11-05
|
||||||
image: /img/content/ember-select-light-tailwind.png
|
image: /img/content/ember-select-light-tailwind.png
|
||||||
pinned: true
|
pinned: false
|
||||||
---
|
---
|
||||||
|
|
||||||
[Fork from Github](https://github.com/ember-a11y/ember-select-light)
|
[Fork from Github](https://github.com/ember-a11y/ember-select-light)
|
||||||
|
|
Loading…
Add table
Reference in a new issue