equals method

bool equals(
  1. DateTime date
)

Checks if two DateTime objects represent the same date (year, month, and day).

Implementation

bool equals(DateTime date) => year == date.year && month == date.month && day == date.day;