1st of next month + one month
Get the first of next month and add a month for a 2nd date.
by taa1953
JavaScript
//var M = Now.getMonth() + 1;
//var Y = Now.getFullYear();
M=11;
Y=2012;
// (Y < 2000) ? Y = Y - 1900 : Y = Y - 2000; // convert to 2 digit year
M++;
if (M == 13) {
M = 1;
Y++;
}
var M2 = M + 1;
var Y2 = Y;
if (M < 10) {
M = "0" + M;
}
if (Y < 10) {
Y = "0" + Y;
}
strStartDate = M + "/01/" + Y;
if (M2 == 13) {
M2 = 1;
Y2++;
}
strEndDate = M2 + "/01/" + Y2;
alert("Start Date: " + strStartDate + " 2nd Date: " + strEndDate);