SyntaxFix
Write A Post
Hire A Developer
Questions
I would use an intermediate date with the first day of the next month, and return the date from the previous day:
int_d = new Date(2008, 11+1,1); d = new Date(int_d - 1);