You are here: irt.org | About | Feedback | 5156 [ previous next ]
Feedback on:
irt.org FAQ Knowledge Base Q533
Sent by
Daniel Ansari on Friday November 23, 2007 at 01:32:57
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
Here's a safer method:
function daysInMonth(dt) {
var endNextMonth = new Date(dt);
endNextMonth.setDate(1);
endNextMonth.setMonth(dt.getMonth() + 1);
endNextMonth.setDate(0);
var daysInEndMonth = endNextMonth.getDate();
return daysInEndMonth;
}
Other feedback on 'irt.org FAQ Knowledge Base Q533' - show all