SyntaxFix
Write A Post
Hire A Developer
Questions
Instead, try:
var now = new Date(); current = new Date(now.getFullYear(), now.getMonth()+1, 1);