isSameYear method

bool isSameYear(
  1. DateTime other
)

Check if the DateTime is in the same year as the other.

Implementation

bool isSameYear(DateTime other) {
  return year == other.year;
}