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"

Clicking on the cell triggers my function...(minimized for this example)

var foobar = function(el){
        var date = el.id.replace("date.", "");
        var time = date.split("-");
        var d = new Date(time[0], time[1], time[2]);
        $(elid).value = el.id;
        $('formated').value = d.format("EE MMM d, yyyy");
}

When I select the cell for Friday Aug 3 2007 for example, I see

elid = date.2007-08-03 --
formated = Monday September 3, 2007


I have used your date.js file in other applications and it has worked  
great for me, (Mostly comparing dates)

But this time I cant get it working.. Its far more lickly that there  
is a flaw in my laginc above then in your lib, so if you could point  
it out to me, I would be most grateful!!

Cheers

______________________________________________________________________
Alex Duffield ❖ Principal ❖ InControl Solutions . http:// 
www.incontrolsolutions.com



On 4-Jun-07, at 10:53 AM, Matt Kruse wrote:

>
> On Jun 4, 11:13 am, Alex Duffield <[EMAIL PROTECTED]> wrote:
>> http://www.mattkruse.com/javascript/date/source.html
>> But both are buggy and produce unreliable results..
>
> A more current and functional version of the above lib can be found
> at:
> http://www.JavascriptToolbox.com/lib/date/
>
> I would be interested to hear of what bugs or unreliable results you
> have found. Both libs have been used extensively in a lot of
> production code and products. Sometimes users report errors when using
> a date format with "mm" for months (actually minutes) instead of "MM"
> and thinking the output is wrong, for example.
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to