You could also do var dteEOY = new Date(new Date()...
# suitescript
b
You could also do var dteEOY = new Date(new Date().getFullYear(), 11, 31)