Revert "Time formatting boost. God damn, that was easy."

This reverts commit 2e43059f3e6d2c928e5ba8d5dd0924bed9957a0c.

this kills firefox
This commit is contained in:
James Campos 2011-10-11 13:08:14 -07:00
parent b71ebbf3d0
commit a3b1483052
2 changed files with 14 additions and 3 deletions

View File

@ -2196,12 +2196,16 @@
return g.callbacks.push(Time.node);
},
node: function(root) {
var node, posttime, time;
var day, hour, min, month, node, posttime, time, year, _, _ref;
if (root.className === 'inline') {
return;
}
node = (posttime = $('.posttime', root)) ? posttime : $('span[id]', root).previousSibling;
Time.date = new Date(Date.parse(node.textContent) + g.chanOffset * HOUR);
_ref = node.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;
month -= 1;
hour = g.chanOffset + Number(hour);
Time.date = new Date(year, month, day, hour, min);
time = $.el('time', {
textContent: ' ' + Time.funk(Time) + ' '
});

View File

@ -1663,7 +1663,14 @@ Time =
node: (root) ->
return if root.className is 'inline'
node = if posttime = $('.posttime', root) then posttime else $('span[id]', root).previousSibling
Time.date = new Date Date.parse(node.textContent) + g.chanOffset*HOUR
[_, month, day, year, hour, min] =
node.textContent.match /(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\d+)/
year = "20#{year}"
month -= 1 #months start at 0
hour = g.chanOffset + Number hour
Time.date = new Date year, month, day, hour, min
#XXX /b/ will have seconds cut off
time = $.el 'time',
textContent: ' ' + Time.funk(Time) + ' '
$.replace node, time