Working with dates > 2037

I have been working a little with the Date class, but unfortunately it suffers from the same problem as many other programming languages: once you pass 2037, nothing works anymore. Is there another class that supports dates > 2037?

Thank you in advance

What Date class are you talking about?

var D= new Date(4427298707181);
alert(D.toLocaleDateString());// April 18 2110

D.setFullYear(D.getFullYear()+1000);

alert(D.toLocaleDateString());
alert(D.getDay()) // the day of the week of April 18 in 3110

The one you describe. Yes, it seems to work with dates > 2037, but some things start to go wrong. I tried for instance to calculate the no. of days between Feb. 28th and March 1st, and was told there were FOUR days…
Especially leap year seems to give problems (I think), but all calculations seem to have problems.

Can you please provide some simplified test code that demonstrates the trouble you’re having with the data calculations?