Get days left till end of the month with moment.js
If you're looking for a plain javascript version, I've wrote this function:
function getMonthDaysLeft(){
date = new Date();
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate() - date.getDate();
}
You could do something like this:
var a = moment().endOf('month');
var b = moment();
if(a.diff(b, 'days') <= 13)
{
//do something
}