Get last day of month from specific date
Here is the script that I made :
var my_date = new Date('12-25-2015');
var last_of_month = new Date( my_date.getFullYear(), my_date.getMonth()+1, 0 );
var day_of_week = last_of_month.getDay();
And day_of_week will have the last day of the month.