@Test public void testGetFirstWeekNull() throws Exception { LocalDate today = LocalDate.now(); RangeUnit unit = new Month(today, today, null, null); assertEquals(0, unit.getFirstWeek(null)); }
public int getFirstWeek(@Nullable LocalDate firstDayOfMonth) { LocalDate from = getFrom(); LocalDate date; if (mMinDate != null && mMinDate.isAfter(from)) { date = mMinDate; } else { date = firstDayOfMonth; } return getWeekInMonth(date); }
RangeUnit extends CalendarUnit { public int getFirstWeek(@Nullable LocalDate firstDayOfMonth) { LocalDate from = getFrom(); LocalDate date; if (mMinDate != null && mMinDate.isAfter(from)) { date = mMinDate; } else { date = firstDayOfMonth; } return getWeekInMonth(date); } }
RangeUnit extends CalendarUnit { public int getFirstWeek(@Nullable LocalDate firstDayOfMonth) { LocalDate from = getFrom(); LocalDate date; if (mMinDate != null && mMinDate.isAfter(from)) { date = mMinDate; } else { date = firstDayOfMonth; } return getWeekInMonth(date); } protected  RangeUnit(@NonNull LocalDate from, @NonNull LocalDate to, @NonNull LocalDate today,
            @Nullable LocalDate minDate, @Nullable LocalDate maxDate); }
RangeUnit extends CalendarUnit { public int getFirstWeek(@Nullable LocalDate firstDayOfMonth) { LocalDate from = getFrom(); LocalDate date; if (mMinDate != null && mMinDate.isAfter(from)) { date = mMinDate; } else { date = firstDayOfMonth; } return getWeekInMonth(date); } protected  RangeUnit(@NonNull LocalDate from, @NonNull LocalDate to, @NonNull LocalDate today,
            @Nullable LocalDate minDate, @Nullable LocalDate maxDate); @Nullable LocalDate getMinDate(); @Nullable LocalDate getMaxDate(); int getFirstWeek(@Nullable LocalDate firstDayOfMonth); }
RangeUnit extends CalendarUnit { public int getFirstWeek(@Nullable LocalDate firstDayOfMonth) { LocalDate from = getFrom(); LocalDate date; if (mMinDate != null && mMinDate.isAfter(from)) { date = mMinDate; } else { date = firstDayOfMonth; } return getWeekInMonth(date); } protected  RangeUnit(@NonNull LocalDate from, @NonNull LocalDate to, @NonNull LocalDate today,
            @Nullable LocalDate minDate, @Nullable LocalDate maxDate); @Nullable LocalDate getMinDate(); @Nullable LocalDate getMaxDate(); int getFirstWeek(@Nullable LocalDate firstDayOfMonth);  }