>>> Timeline.DateTime.parseGregorianDateTime('test')
Invalid Date
>>> Timeline.DateTime.parseGregorianDateTime('')
Invalid Date
>>> Timeline.DateTime.parseGregorianDateTime(false)
Invalid Date
It looks like the function is intended to return null in these instances,
as the ISO8601 parser does, but it returns an invalid Date object instead.
Problem is here:
http://code.google.com/p/simile-widgets/source/browse/ajax/trunk/src/webapp/api/
scripts/date-time.js#248
change from:
{{{
try {
return new Date(Date.parse(s));
} catch (e) {
return null;
}
}}}
to:
{{{
try {
var d = new Date(Date.parse(s));
if (!d.getFullYear()) d = null;
return d;
} catch (e) {
return null;
}
}}}
Original issue reported on code.google.com by nick.rab...@gmail.com on 21 May 2009 at 8:41
Original issue reported on code.google.com by
nick.rab...@gmail.com
on 21 May 2009 at 8:41