hardlounge/client/js/libs/handlebars/tz.js

11 lines
324 B
JavaScript
Raw Normal View History

"use strict";
2017-04-29 10:31:04 +00:00
const moment = require("moment");
2017-05-06 18:44:57 +00:00
const constants = require("../../constants");
2016-03-11 20:14:15 +00:00
2017-04-29 10:31:04 +00:00
module.exports = function(time) {
2017-05-06 18:44:57 +00:00
const options = require("../../options");
const format = options.showSeconds ? constants.timeFormats.msgWithSeconds : constants.timeFormats.msgDefault;
return moment(time).format(format);
2016-12-18 15:53:28 +00:00
};