Android calendar month starts at 0

Possible duplicate:
Why is January month 0 in the Java calendar?

It seems that the calendar in android makes the month start at 0. Why should it be designed like this?

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

Today mMonth is 4.

+4
source share
1 answer

This was not done by Android developers. Here's how it works in java.util.Calendar. If you want to know why Java developers designed it this way, go through this topic. Why is january month 0 in the java calendar?

0
source

All Articles