0

Can someone please explain to me why the implementation would choose to return a zero based month?

While I understand I can just add 1 to it to make it usable in a string, I am uncertain of the zero based reasoning, ESPECIALLY since getDate starts with 1.

Todd Vance
  • 4,627
  • 7
  • 46
  • 66
  • 4
    There is no reasoning, it came from Java. A wild guess: obtaining a month name from a number is common and arrays start at zero, but there are no day names measured across an entire month. – Ry- Sep 05 '13 at 01:09
  • Thank you minitech ... I thought it was a valid question and I appreciate your answer. – Todd Vance Sep 05 '13 at 01:14
  • 1
    I feel this is a valid question. Good way to find the answer would be to simply go to the source code for the class. After all java is open source. – Neeraj Sep 05 '13 at 01:15
  • 1
    Ah man, I didnt explain well enough that I was speaking about Javascript, sorry. – Todd Vance Sep 05 '13 at 01:17

0 Answers0