I am pretty new in JavaScript and I have the following problem.
I have to retrieve the actual year (that is 2015).
So I done in this way:
var oggi = new Date();
var year = oggi.getYear();
The problem is that the value of year variable is 115, I think that it depend by the fact that it is calculated started by 1900, infact 1900 + 115 = 2015
I know that I can add the 1900 value to the value retrieved into the year variable so I will obtain the desidered actual year value. But it seems to me a dirty solution. Can I do the same thing with a better solution?
Tnx