The following Java Script code is used to get the last day of any given month on a given year. The given month and can be in either past or future year.
//This is print the last day of the month of February 1980.
var lastday = (new Date((new Date(1980, 02, 1)) - 1)).getDate();
document.write(lastday);
Ref : http://www.hunlock.com/blogs/Javascript_Dates-The_Complete_Reference
//This is print the last day of the month of February 1980.
var lastday = (new Date((new Date(1980, 02, 1)) - 1)).getDate();
document.write(lastday);
Ref : http://www.hunlock.com/blogs/Javascript_Dates-The_Complete_Reference
No comments:
Post a Comment