I use the following syntax:

System.out.println(calendar.get(Calendar.DAY_OF_MONTH)); 

And everything works correctly displays 21 and today is the 21st number.

But when I send:

 System.out.println(calendar.get(Calendar.MONTH)); 

I'm typing 11 though it's now the 12th month.

Why is this happening, how to fix it? Help me please.

  • eight
    Months are counted from scratch - Chubatiy
  • This is unexpected ... Thank you. - Pavel

1 answer 1

Try using GreagorianCalendar, a successor from Calendar