Javascript examples for Date Operation:Month
get the first date of the current month
<html> <head> <title>Please Rate if it helps</title> <script> Date.prototype.getMonthStartEnd = function (start) { var StartDate = new Date(this.getFullYear(), this.getMonth(), 1); var EndDate = new Date(this.getFullYear(), this.getMonth() + 1, 0); return [StartDate, EndDate]; }// w w w . j ava 2 s. c om window.onload = function () { document.write(new Date().getMonthStartEnd()); } </script> </head> <body> </body> </html>