7

Possible Duplicate:
Why is January month 0 in Java Calendar?

It seems that calendar in android makes month begins from 0. Why should it be designed like this?

final Calendar c = Calendar.getInstance();
mMonth = c.get(Calendar.MONTH);

Today, the mMonth is 4.

Community
  • 1
  • 1
Sam
  • 964
  • 3
  • 11
  • 24

1 Answers1

0

This was not done by the Android developers. This is how it works in java.util.Calendar. If you want to know why the Java developers designed it this way, please go through this thread. Why is January month 0 in Java Calendar?

Community
  • 1
  • 1
sachin garg
  • 1,316
  • 15
  • 27