minutes working, /b/ will have seconds cut off

This commit is contained in:
James Campos 2011-06-05 17:15:22 -07:00
parent db2c8bb6fb
commit c4dafeb682
2 changed files with 7 additions and 7 deletions

View File

@ -1684,16 +1684,16 @@
}); });
time.funk = Function('time', "return '" + code + "'"); time.funk = Function('time', "return '" + code + "'");
return g.callbacks.push(function(root) { return g.callbacks.push(function(root) {
var day, hour, min_sec, month, s, timeEl, year, _, _ref; var day, hour, min, month, s, timeEl, year, _, _ref;
if (root.className === 'inline') { if (root.className === 'inline') {
return; return;
} }
s = $('span[id^=no]', root).previousSibling; s = $('span[id^=no]', root).previousSibling;
_ref = s.textContent.match(/(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\S+)/), _ = _ref[0], month = _ref[1], day = _ref[2], year = _ref[3], hour = _ref[4], min_sec = _ref[5]; _ref = s.textContent.match(/(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\d+)/), _ = _ref[0], month = _ref[1], day = _ref[2], year = _ref[3], hour = _ref[4], min = _ref[5];
year = "20" + year; year = "20" + year;
month -= 1; month -= 1;
hour = g.chanOffset + Number(hour); hour = g.chanOffset + Number(hour);
time.date = new Date(year, month, day, hour); time.date = new Date(year, month, day, hour, min);
timeEl = $.el('time', { timeEl = $.el('time', {
textContent: time.funk(time) textContent: time.funk(time)
}); });

View File

@ -1324,13 +1324,13 @@ time =
g.callbacks.push (root) -> g.callbacks.push (root) ->
return if root.className is 'inline' return if root.className is 'inline'
s = $('span[id^=no]', root).previousSibling s = $('span[id^=no]', root).previousSibling
[_, month, day, year, hour, min_sec] = [_, month, day, year, hour, min] =
s.textContent.match /(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\S+)/ s.textContent.match /(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\d+)/
year = "20#{year}" year = "20#{year}"
month -= 1 #months start at 0 month -= 1 #months start at 0
hour = g.chanOffset + Number hour hour = g.chanOffset + Number hour
time.date = new Date year, month, day, hour time.date = new Date year, month, day, hour, min
#XXX min_sec unused #XXX /b/ will have seconds cut off
timeEl = $.el 'time', timeEl = $.el 'time',
textContent: time.funk time textContent: time.funk time