Month extends RangeUnit { @Override public boolean hasPrev() { LocalDate minDate = getMinDate(); if (minDate == null) { return true; } else { LocalDate from = getFrom(); int year = minDate.getYear(); int yearFrom = from.getYear(); int month = minDate.getMonthOfYear(); int monthFrom = from.getMonthOfYear(); return year < yearFrom || (year == yearFrom && month < monthFrom); } } protected  Month(@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<Week> getWeeks(); int getSelectedIndex(); @Override void build();  }
@Test public void testHasPrevNull() throws Exception { assertTrue(mMonth.hasPrev()); }
@Test public void testHasPreFalse() throws Exception { LocalDate min = LocalDate.parse("2014-10-01"); Month week = new Month(mToday, mToday, min, null); assertFalse(week.hasPrev()); }
@Test public void testHasPrevTrue() throws Exception { LocalDate min = LocalDate.parse("2014-09-30"); Month week = new Month(mToday, mToday, min, null); assertTrue(week.hasPrev()); }
@Test public void testHasPrevYear() throws Exception { LocalDate min = LocalDate.parse("2013-10-08"); Month week = new Month(mToday, mToday, min, null); assertTrue(week.hasPrev()); }