isSameDateOnly method

  1. @useResult
bool isSameDateOnly(
  1. DateTime other
)

Checks if the current DateTime has the same date (year, month, day) as another DateTime.

Returns true when year, month, and day all match.

Implementation

@useResult
bool isSameDateOnly(DateTime other) =>
    year == other.year && month == other.month && day == other.day;