isSameMonth method
Checks if this date is in the same month as other.
Example:
print(DateTime(2023, 1, 1).isSameMonth(DateTime(2023, 1, 15))); // true
Implementation
bool isSameMonth(DateTime other) => year == other.year && month == other.month;