Code example for Calendar

Methods: add, clone, get

0
    else 
      return nextDay(alertAt);
  } 
 
  private boolean repeatsFor(Calendar c) {
    return repeatDays().contains(WEEKDAYS[c.get(Calendar.DAY_OF_WEEK) - Calendar.SUNDAY]);
  } 
     
  private Calendar alertAtRepeating(Calendar c) {
    return alertAtRepeatingAux(nextDay(c));
  } 
   
  private Calendar alertAtRepeatingAux(Calendar c) {
    if (repeatsFor(c))
      return c;
    else 
      return alertAtRepeatingAux(nextDay(c));
  } 
   
  private Calendar nextDay(Calendar c) {
    Calendar nextC = (Calendar) c.clone();
    nextC.add(Calendar.DAY_OF_WEEK, 1);
    return nextC;
  } 
 
  public List<String> repeatDays() {
    boolean[] selections = {