Right now is 3/15/11 and when I’m calling a new date object:
Date now = new Date();
I’m getting in return
- the month as 2 (
getMonth()), - the day as 2 (
getDay()) - and the year (
getYear()) as 111.
Is there a reason for this convention?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Straight from the class’s documentation:
And as for
getDay():March 15th 2011 is in fact a Tuesday.