daysInMonth property
int
daysInMonth
The number of days in this month (28
, 29
, 30
, or 31
).
Implementation
int get daysInMonth => month == DateTime.february
? (isLeapYear ? 29 : 28)
: const [31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1];