Reputation: 1703
I am trying to get today's date using a JavaScript date object. When I do I run the following code:
var date = new Date();
date = new Date(date.getYear(), date.getMonth(), 1);
I get this result:
Mon Aug 01 112 00:00:00 GMT +0200
Instead of today's date. I have used this exact code before with no issues. Am I doing something wrong?
Upvotes: 0
Views: 86