I have to pre-populate two calendars with values. I need it to be in the format of January 16, 2012. Currently, I am using Date.js (http://www.datejs.com/).
I currently have:
var e = Date.today(),
s = Date.today().add(-30).days();
These return Mon Jan 16 2012 00:00:00 GMT-0500 (EST)
which is of no use to me. Either using Date.js or not (I don't care), how do I get the current date in the format I'm asking for?
Date.js offers formatting with its custom
toString
method:You can see the full list of format specifiers at http://code.google.com/p/datejs/wiki/FormatSpecifiers.