You might need to do something like this.


var cy = new Number(curdt.getFullYear());