soulreaver soulreaver - 1 year ago 100
Android Question

Calendar.MONTH gives wrong value

I'm trying to get the actual month from the

using the following:

Calendar c = Calendar.getInstance();
String time = String.valueOf(c.get(Calendar.MONTH));

According the system settings "Settings --> Date & Time" actual month is 10 while
returns 09.

Answer Source

Keep in mind that months values start from 0, so October is actually month number 9.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download