getDaysInMonth function
Implementation
int getDaysInMonth(int year, int month) {
if (month == 12) {
final bool isLeapYear = Jalali(year).isLeapYear();
if (isLeapYear) return 30;
return 29;
}
const List<int> daysInMonth = <int>[
31,
31,
31,
31,
31,
31,
30,
30,
30,
30,
30,
-1
];
return daysInMonth[month - 1];
}