nextMonthlyDay method

DateTime nextMonthlyDay(
  1. DateTime fromDate
)

The next day in a monthly occurrence from the given fromDate.

Implementation

DateTime nextMonthlyDay(DateTime fromDate) => fromDate
    .subtract(Duration(days: fromDate.weekday - 1))
    .add(Duration(days: 7 * weekOfMonth! + dayOfWeek! - 1));