Format topic set date
This commit is contained in:
parent
92cc130e2b
commit
43f58a8075
7
client/js/libs/handlebars/date.js
Normal file
7
client/js/libs/handlebars/date.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Handlebars.registerHelper(
|
||||||
|
"localeDate", function(date) {
|
||||||
|
date = new Date(date);
|
||||||
|
|
||||||
|
return date.toLocaleString();
|
||||||
|
}
|
||||||
|
);
|
@ -1 +1 @@
|
|||||||
Topic set by {{nick}} on {{when}}
|
Topic set by {{nick}} on {{localeDate when}}
|
||||||
|
@ -39,7 +39,7 @@ module.exports = function(irc, network) {
|
|||||||
type: Msg.Type.TOPIC_SET_BY,
|
type: Msg.Type.TOPIC_SET_BY,
|
||||||
mode: chan.getMode(data.nick),
|
mode: chan.getMode(data.nick),
|
||||||
nick: data.nick,
|
nick: data.nick,
|
||||||
when: data.when,
|
when: new Date(data.when * 1000),
|
||||||
self: data.nick === irc.user.nick
|
self: data.nick === irc.user.nick
|
||||||
});
|
});
|
||||||
chan.messages.push(msg);
|
chan.messages.push(msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user