var curDay new Date var nextYear new Date curDay getFullYear curDay ge

1
2
3
4
var curDay = new Date;
var nextYear = new Date(curDay.getFullYear()+1, curDay.getMonth(), curDay.getDate());
var diff = nextYear - curDay;
console.log(diff);