daysInMonth method

int daysInMonth([
  1. int firstDay = 1
])

当月总天数

firstDay - 每月起算日期,assert(firstDay > 0 && firstDay < 29)

Implementation

int daysInMonth([int firstDay = 1]) =>
    ((lastDayInMonth(firstDay) - firstDayInMonth(firstDay)) / 86400000)
        .ceil();