isSameMonth function

bool isSameMonth(
  1. DateTime date1,
  2. DateTime date2
)

Checks if two dates are on the same month.

Implementation

bool isSameMonth(DateTime date1, DateTime date2) {
  final a = date1.toUtc();
  final b = date2.toUtc();
  return a.year == b.year && a.month == b.month;
}