Get last day of month
JavaScript
function daysInMonth(year, month) {
return new Date(year, month, 0).getDate();
}
console.log(daysInMonth(2018, 6))
function daysInMonth(year, month) {
return new Date(year, month, 0).getDate();
}
console.log(daysInMonth(2018, 6))