mirror of
https://github.com/thelounge/thelounge
synced 2024-12-21 18:03:06 +00:00
17 lines
235 B
JavaScript
17 lines
235 B
JavaScript
Handlebars.registerHelper(
|
|
"tz", 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;
|
|
}
|
|
);
|