github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/helpers/format-ts.js (about) 1 import moment from 'moment'; 2 import Helper from '@ember/component/helper'; 3 4 export function formatTs([date], options = {}) { 5 const format = options.short 6 ? 'MMM D' 7 : options.timeOnly 8 ? 'HH:mm:ss' 9 : "MMM DD, 'YY HH:mm:ss ZZ"; 10 return moment(date).format(format); 11 } 12 13 export default Helper.helper(formatTs);