New helpers to standardize date and timestamp formats
This commit is contained in:
parent
c3eb0b2493
commit
50bf9d392a
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
Loading…
Reference in New Issue