isEndOfRange static method

dynamic isEndOfRange(
  1. CalendarDateTime? element,
  2. int year,
  3. int month,
  4. int day,
)

Implementation

static isEndOfRange(CalendarDateTime? element, int year, int month, int day) {
  if (element?.year != year) return false;
  if (element?.toMonth == null) {
    if (element?.toDay == null) return element?.day == day;
    return element?.toDay == day;
  } else if (element?.toMonth == month) {
    if (element?.toDay == null) return element?.day == day;
    return element?.toDay == day;
  }
  return false;
}