@Test public void testHasPrevYear() throws Exception { LocalDate min = LocalDate.parse("2013-10-08"); Month week = new Month(mToday, mToday, min, null); assertTrue(week.hasPrev()); }
@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); } }
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); } } }
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); }
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(); }
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();  }