/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function select_preview_month() { var now = new Date(2009,2,1); var first_day = new Date(now.getFullYear(), now.getMonth(), 1); var last_day = new Date(now.getFullYear(), now.getMonth(), 0); alert(first_day); alert(last_day); alert(first_day.getDate() + '.' + first_day.getMonth() + '.' + first_day.getFullYear()); alert(last_day.getDate() + '.' + first_day.getMonth() + '.' + last_day.getFullYear()); // first_day.getMonth() is not an error !!! }