DateTime start = DateTimeFormat.forPattern("dd/mm/yyyy").parseDateTime("30/08/2012");
I added 10 days into start date above, but it does not switch to the next month. However, the code below will.
DateTime start = DateTimeFormat.forPattern("dd/MM/yyyy").parseDateTime("30/08/2012");
Why ?
You are mixing minutes (
mm) and months (MM). From theDateTimeFormatjavadoc:The same pattern symbols are by the way also used on Java SE’s own
SimpleDateFormatclass.