Month extends RangeUnit { @Override public boolean prev() { if (hasPrev()) { setFrom(getFrom().minusDays(1).withDayOfMonth(1)); setTo(getFrom().withDayOfMonth(getFrom().dayOfMonth().getMaximumValue())); build(); return true; } else { return false; } } 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 testPrev() throws Exception { assertTrue(mMonth.prev()); assertEquals(LocalDate.parse("2014-09-01"), mMonth.getFrom()); assertEquals(LocalDate.parse("2014-09-30"), mMonth.getTo()); assertEquals(LocalDate.parse("2014-09-01"), mMonth.getWeeks().get(0).getFrom()); }