travis-web/app/helpers/pretty-date.js
Curtis Ekstrom ee4b26a7d7
Remove moment deprecation on builds page
See https://github.com/moment/moment/issues/1407 for more details. All that was needed was to manually instantiate a new Date() object
2016-04-14 13:22:15 +02:00

8 lines
248 B
JavaScript

import { timeAgoInWords, safe } from 'travis/utils/helpers';
import Ember from "ember";
export default Ember.Helper.helper(function(params) {
let date = new Date(params[0]);
return safe(moment(date).format('MMMM D, YYYY H:mm:ss') || '-');
});