isSameMonth function
Returns true if date1 and date2 represent the same UTC year and month.
Implementation
bool isSameMonth(String date1, String date2) {
final d1 = tryParseDate(date1);
final d2 = tryParseDate(date2);
if (d1 == null || d2 == null) return false;
return d1.year == d2.year && d1.month == d2.month;
}