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);
More Related Contents:
- Java Android Calendar/DateFormat this format XXXXXXXX [closed]
- How to calculate remaining days of the month? [duplicate]
- Why is January month 0 in Java Calendar?
- How to sanity check a date in Java
- How to handle calendar TimeZones using Java?
- How to tackle daylight savings using TimeZone in Java
- Number of days in particular month of particular year?
- java Calendar, Date, and Time management for a multi-timezone application
- Check if a given time lies between two times regardless of date
- How to convert a date String to a Date or Calendar object?
- Java: How do you convert a UTC timestamp to local time?
- Creating java date object from year,month,day
- System.currentTimeMillis() vs. new Date() vs. Calendar.getInstance().getTime()
- Java Date year calculation is off by year for two days
- last day of month calculation
- How to check if a date Object equals yesterday?
- Understanding java.util.Calendar WEEK_OF_YEAR [duplicate]
- Java Date vs Calendar
- Start of week for locale using Joda-Time
- How to get first day of a given week number in Java
- A good date converter for Jalali Calendar in Java? [closed]
- Why is the month changed to 50 after I added 10 minutes?
- Difference between EST and America/New_York time zones
- Get the number of days, weeks, and months, since Epoch in Java
- Is there a good way to get the date of the coming Wednesday?
- Calendar view for Android GingerBread and before (API
- First day of next month with java Joda-Time
- java get the first date and last date of given month and given year [duplicate]
- calculate number of weeks in a given year
- How to save and retrieve Date in SharedPreferences