minutes working, /b/ will have seconds cut off
This commit is contained in:
parent
db2c8bb6fb
commit
c4dafeb682
@ -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)
|
||||||
});
|
});
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user