Takes a Date object and returns a Date object for the last day of its month. The date object returned is set to midnight local time.
$ npm install get-last-date-of-month --save
const GetLastDateOfMonth = require('get-last-date-of-month');
let endOfMonth = GetLastDateOfMonth( new Date() );
// Date object representing the last day of the current month