daysInMonth property
int
get
daysInMonth
Implementation
int get daysInMonth {
return switch (month) {
2 => isLeapYear ? 29 : 28,
4 || 6 || 9 || 11 => 30,
1 || 3 || 5 || 7 || 8 || 10 || 12 => 31,
_ => 0,
};
}