You haven't provided the code that defines how the toDateString method you have added to dates is defined. From the look of that output it appears that it totally ignores the parameter you entered but without seeing the code there is no way to tell for certain.
If you are going to add a method for formatting the date the way you want rather than just joining the fields together then you ought to use one that works - see http://www.felgall.com/datemethods.htm for one alternative where myDate.format('n/d/y') will return the date in the format you want.
You haven't provided the code that defines how the toDateString method you have added to dates is defined.
lol, i'll do it for him since HE didn't add it (brendan did):
Code:
new Date().toDateString == function toDateString() { [native code] }
you don't need a whole library to replace a few simple lines of code, that's like adding jQuery to alter document.title using $("title").html("hello")...
Except, again, he *SEEMED* to say he wants the NAME of the month and *NOT* the day of the month, at all.
So:
Code:
var mnames = ["Jan","Feb","Mar","Apr","May","Jun",
"Jul","Aug","Sep","Oct","Nov","Dec" ];
var d = new Date();
alert( mnames[d.getMonth()] + " " + d.getFullYear() );
But who knows?
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
obviously not or the date would have displayed - I use that particular combination quite a lot myself, it was one of the main reasons i started creating that library.