Week extends RangeUnit { @Override public boolean hasPrev() { LocalDate minDate = getMinDate(); if (minDate == null) { return true; } else { return minDate.isBefore(mDays.get(0).getDate()); } } Week(@NonNull LocalDate date, @NonNull LocalDate today, @Nullable LocalDate minDate,
                @Nullable LocalDate maxDate); @Override boolean hasNext(); @Override boolean hasPrev(); @Override boolean next(); @Override boolean prev(); @Override int getType(); @Override void deselect(@NonNull LocalDate date); @Override boolean select(@NonNull LocalDate date); @NonNull List<Day> getDays(); @Override void build();  }
@Test public void testHasPrevNull() throws Exception { assertTrue(mWeek.hasPrev()); }
@Test public void testHasPrevTrue() throws Exception { LocalDate today = LocalDate.now(); Week week = new Week(today, today, today.minusWeeks(1), null); assertTrue(week.hasPrev()); }
@Test public void testHasPrevFalse() throws Exception { LocalDate today = LocalDate.now(); Week week = new Week(today, today, today.withDayOfWeek(DateTimeConstants.MONDAY), null); assertFalse(week.hasPrev()); }