Exemplo n.º 1
0
  public CalendarDays getNextMonth() {
    int newMonth = month + 1;
    int newYear = year;

    if (newMonth > 11) {
      newMonth = 0;
      newYear = newYear + 1;
    }
    CalendarDays result = new CalendarDays(context);
    result.setDate(newYear, newMonth);
    return result;
  }
Exemplo n.º 2
0
  public CalendarDays getPriorMonth() {
    int newMonth = month - 1;
    int newYear = year;

    if (newMonth < 0) {
      newMonth = 11;
      newYear = newYear - 1;
    }
    CalendarDays result = new CalendarDays(context);
    result.setDate(newYear, newMonth);
    return result;
  }