If day is 0, it will return the last day of last month.
function getDays(year, month) {
return new Date(year, month, 0).getDate();
}
If day is 0, it will return the last day of last month.
function getDays(year, month) {
return new Date(year, month, 0).getDate();
}