On Tue, Sep 9, 2008 at 3:47 PM, Caoimh <[EMAIL PROTECTED]> wrote:

>
> Thanks for the reply :)
>
> I have used this:
> start="May 28 0100 09:00:00 GMT"
> and you are right about it adding dates < 100 to 1900.
> Any other suggestions?
>

I guess you haven't specified a `dateFileFormat` attribute in your event
source. In that
case, the code uses the "gregorian" parser which itself, in your case, falls
back to

Date(Date.parse(your_date_as_string));

I've made a small unit test for the parseGregorianFunction to check your
case, and it fails :

      [...] (skipping my test suite boiler plate)
      test_gregorian_parsing: function() {
           var d = parseGregorianDateTime("May 28 0100 09:00:00 GMT");
           assertArrayEquals(datetuple(d), [100, 5, 28, 10, 0]);
           d = parseGregorianDateTime("May 28 0099 09:00:00 GMT");
           assertArrayEquals(datetuple(d), [99, 5, 28, 10, 0]); // <-- This
assertion fails
     }

For what it worth, I had to made an ultra-minimal and dummy javascript
version
`strptime` which I use for my timeline to be able to parse event sources
like :

  {"dateTimeFormat": "%Y/%m/%d",
   "events": [{"description": "", "start": "1575/01/01", "title": "my
event"}]
  }

If anyone is interested, I could post the few lines of code I've used but
I'm
pretty sure there are a lot of more complete and robust implementations
than my 20 lines of JS.

Adrien.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to