isSameDate method

bool isSameDate(
  1. DateTime dateTime
)

Checks whether this date has the same day and month as the given dateTime.

Year is intentionally ignored.

Implementation

bool isSameDate(DateTime dateTime) {
  return day == dateTime.day && month == dateTime.month;
}