10 lines
193 B
JavaScript
10 lines
193 B
JavaScript
function endOfMonth(date)
|
|
{
|
|
|
|
return new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
|
|
}
|
|
|
|
dt = new Date();
|
|
|
|
console.log(endOfMonth(dt).toString());
|