I have this script,
var today = new Date(); var dd = today.getDate(); var ffffd = today.getDate()-1; var ffffdd = today.getDate()-2; var mm = today.getMonth()+
Try using bellow
var date = new Date(); var monthStartDay = new Date(date.getFullYear(), date.getMonth(), 1); var monthEndDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);