Why Java Calendar set(int year, int month, int date) not returning correct date? [duplicate]

1 for month is February. The 30th of February is changed to 1st of March.
You should set 0 for month. The best is to use the constant defined in Calendar:

c1.set(2000, Calendar.JANUARY, 30);

Leave a Comment