mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
parent
5ed180396e
commit
13deb55cbb
1 changed files with 6 additions and 3 deletions
|
@ -12,12 +12,15 @@
|
|||
import { helper } from '@ember/component/helper';
|
||||
|
||||
export function formattedDate(params) {
|
||||
let date = params[0];
|
||||
let format = params[1];
|
||||
if (is.undefined(format)) format = 'Do MMMM YYYY, HH:mm';
|
||||
|
||||
return moment(params[0]).utc().format(format);
|
||||
// return moment(params[0]).format(format);
|
||||
// return moment(params[0]).local().format(format);
|
||||
// https://momentjs.com/docs/#/manipulating/local/
|
||||
return moment.utc(date).local().format(format);
|
||||
|
||||
// in production with 1.65.4 & 1.67.4...
|
||||
// return moment(params[0]).utc().format(format);
|
||||
}
|
||||
|
||||
export default helper(formattedDate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue