YYYY DateTime Problem in Java
See this code of datetime in java
SimpleDateFormat format = new SimpleDateFormat("dd-MMM-YYYY");
Calendar day1 = new GregorianCalendar(2014, Calendar.DECEMBER, 28);
System.out.println(format.format(day1.getTime()));
Calendar day2 = new GregorianCalendar(2014, Calendar.DECEMBER, 29);
System.out.println(format.format(day2.getTime()));
This is what you get in console :
28-Dec-2015
29-Dec-2015
WTH!!!!!!!!!!!!!!!!!!!!!!!!!
But this problem doesn’t happen in Joda Time
And this is why all twitter account in android is force sign out by twitter. According to this, it says “Values calculated for the WEEK_OF_MONTH field range from 0 to 6. Week 1 of a month (the days with WEEK_OF_MONTH = 1) is the earliest set of at least getMinimalDaysInFirstWeek() contiguous days in that month, ending on the day before getFirstDayOfWeek(). Unlike week 1 of a year, week 1 of a month may be shorter than...