Open GoogleCodeExporter opened 9 years ago
Original comment by larryklu...@gmail.com
on 29 Mar 2009 at 6:42
@@ -12411,7 +12410,9 @@ Timeplot.DefaultTimeGeometry.prototype = {
case time.DECADE:
case time.CENTURY:
case time.MILLENNIUM:
- var l = t.getUTCFullYear();
+ var tmpd = new Date(t.getTime());
+ tmpd.setDate(t.getDate() + 1);
+ var l = tmpd.getUTCFullYear();
break;
}
if (x > 0) {
(place it here so that I can find it later in case)
Original comment by stefano.mazzocchi@gmail.com
on 30 Mar 2009 at 6:36
Original comment by stefano.mazzocchi@gmail.com
on 30 Mar 2009 at 6:37
Any chance of this fix being applied to the core hosted distribution at
http://static.simile.mit.edu/timeplot/api/1.0/timeplot-api.js ?
Original comment by voiceins...@gmail.com
on 26 Jun 2009 at 7:32
This bug can be also observed in the Timeplot tutorial at
http://www.simile-widgets.org/timeplot/docs/
1) Look at the Timeplot resulting from tutorial step 10.
2) Notice that, e.g., the range of dates from year 2006 is labeled as year 2005.
Original comment by capts...@gmail.com
on 7 Aug 2009 at 7:06
Workaround = fix _calculateGrid (using the patch from comment #2) before
instantiating
DefaultTimeGeometry:
function onLoad() {
var eventSource = new Timeplot.DefaultEventSource();
Timeplot.DefaultTimeGeometry.prototype._calculateGrid = function() {
...
case time.CENTURY:
case time.MILLENNIUM:
var tmpd = new Date(t.getTime());
tmpd.setDate(t.getDate() + 1);
var l = tmpd.getUTCFullYear();
break;
...
return grid;
};
Original comment by capts...@gmail.com
on 7 Aug 2009 at 7:20
Original issue reported on code.google.com by
davidnwe...@gmail.com
on 29 Mar 2009 at 6:10Attachments: