Ah.. that is sill.. but oh well.. I should have been using your Date.parseString() function in the first place..
I used var d = Date.parseString(date, "yyyy-MM-dd"); and that fixed everything.. Sorry for slagging your lib... I should have know the error was on my side! Cheers. ______________________________________________________________________ Alex Duffield ❖ Principal ❖ InControl Solutions . http:// www.incontrolsolutions.com On 4-Jun-07, at 12:07 PM, Matt Kruse wrote: > > On Jun 4, 1:27 pm, Alex Duffield <[EMAIL PROTECTED]> wrote: >> Matt, I was using this on a calendar in an app I am building. each td >> in the calendar has an id of "date.YYYY-MM-DD" >> var d = new Date(time[0], time[1], time[2]); > > Here is the problem. The Date() constructor takes months as 0=January. > So you are passing in "8" thinking it should be August, but in fact > that means month 9, which is September. > > Hope that helps, > > Matt Kruse > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
