hardlounge/client/js/libs/handlebars/tz.js
Pavel Djundik fb87bd3a58 Webpack
2016-12-27 19:15:30 +02:00

16 lines
205 B
JavaScript

module.exports = function(time) {
time = new Date(time);
var h = time.getHours();
var m = time.getMinutes();
if (h < 10) {
h = "0" + h;
}
if (m < 10) {
m = "0" + m;
}
return h + ":" + m;
};