pass formatted dates to mithril build

This commit is contained in:
Thibault Duplessis 2015-01-06 18:32:52 +01:00
parent eb4cae924c
commit eb9578ebe6
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ var boardContent = m('div.cg-board-wrap', m('div.cg-board'));
function timer(pov) {
var time = moment().add(pov.secondsLeft, 'seconds');
return m('time.moment-from-now', {
datetime: time
datetime: time.format()
}, time.fromNow());
}

View file

@ -37,7 +37,7 @@ module.exports = {
secondsFromNow: function(seconds) {
var time = moment().add(seconds, 'seconds');
return m('time.moment-from-now', {
datetime: time
datetime: time.format()
}, time.fromNow());
},
title: function(ctrl) {