public boolean shift(Calendar now) { /* * Calling the method below will also make sure * that string is parsed and calendars are updated. */ if (hasRepeater()) { cal = getCalendar(); endCal = getEndCalendar(); /* Shift both calendars. */ repeater.shiftCalendar(cal, now); if (endCal != null) { repeater.shiftCalendar(endCal, now); } /* Invalidate string representations. */ string = null; stringWithoutBrackets = null; } return repeater != null; }