Time formats are a common problem to deal with. There are all kinds of problems
dealing with ambiguities in non-standardized date formats, and many edge cases
to consider. Browsers implement javascript date handlers in different ways.
Most support RFC2822 / IETF date syntax:
"Mon, Dec 25 1995" or "25 Dec 1995" or "December 25, 1995".
RFC2822 allows assumptions about values (eg year is 'any numeric year 1900 or
later') and specified (now obsolete) two digit years in the date field, and
alphabetic time zone codes.
Web browsers try to be very forgiving in what they accept and parse as
date/time strings, even if the string isn't exactly valid, the browser will
take its best guess.
Many javascript date handling libraries will assume "0099" means the same as
"99" and assume that is a two-digit abbreviation of 1999.
ISO8601 is another date format that is used, but native support in browsers
varies across versions. Timeline supports it's own iso8601 parse routines.
Thus, the iso8601 format of this date would be:
"0099-01-01T09:00:00Z"
Timeline parses this correctly. You need to make sure that you specify
'dateTimeFormat': 'iso8601' in your date json. This will tell timeline to use
the iso8601 date parser instead of the default gregorian parser.
var j = new Date();
Timeline.DateTime.setIso8601(j,"0099-01-01T09:00:00Z");
-> Date {Thu Jan 01 0099 04:00:00 GMT-0500 (EST)}
--Mike
On Nov 13, 2012, at 9:29 AM, Stephen Cooper wrote:
> I know this is a stale post but having just come across this problem myself
> it looks as if Timeline doesn't like any kind of precision with dates pre
> 100CE.
>
> So an event with
>
> start="Jan 1 0099 09:00:00 GMT"
>
> won't be displayed. But the same event with
>
> start="99" or start="99 AD"
>
> will show up fine.
>
> Just having the year is accurate enough for the timeline I'm working on (also
> involving Romans...) so I've not investigated any further, but hope that
> helps.
>
> s.
>
>
>
> On Wednesday, 23 November 2011 12:58:23 UTC, Matthew Collins wrote:
> I''m trying to do a timeline for the Roman emperors and need to enter
> dates and 2 digit years. Any clues?
> Thanks.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "SIMILE Widgets" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/simile-widgets/-/dDJRQXIvlCcJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/simile-widgets?hl=en.
--
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en.