New helpers to standardize date and timestamp formats

This commit is contained in:
Michael Lange 2019-01-30 22:44:23 -08:00
parent c3eb0b2493
commit 50bf9d392a
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,9 @@
import moment from 'moment';
import Helper from '@ember/component/helper';
export function formatTs([date]) {
const format = 'MMMM D, YYYY';
return moment(date).format(format);
}
export default Helper.helper(formatTs);

View File

@ -0,0 +1,9 @@
import moment from 'moment';
import Helper from '@ember/component/helper';
export function formatMonthTs([date]) {
const format = 'MMM DD HH:mm:ss ZZ';
return moment(date).format(format);
}
export default Helper.helper(formatMonthTs);

View File

@ -0,0 +1,9 @@
import moment from 'moment';
import Helper from '@ember/component/helper';
export function formatTs([date]) {
const format = "MMM DD, 'YY HH:mm:ss ZZ";
return moment(date).format(format);
}
export default Helper.helper(formatTs);