Blame view
client/helpers/template/date-time.js
359 Bytes
5cb01249d
|
1 2 3 4 5 6 7 8 9 10 11 |
Template.registerHelper( 'formatDateTime', ( timestamp, format ) => { if ( timestamp && format ) { return moment( timestamp ).format( format ); } }); Template.registerHelper( 'formatDateTimeLocal', ( timestamp, timezone, format ) => { if ( timestamp && timezone && format ) { return moment( timestamp ).tz( timezone ).format( format ); } }); |