startDate method
Returns the next date that fits the dueDay.
- If the
date- DateTime.day is less than the dueDay, it's returned the same month with the DateTime.day being dueDay, clamped to the months length. - If the
date- DateTime.day is greater than the dueDay, it's returned the next month with the DateTime.day being dueDay, clamped to the months length.
Implementation
@override
DateTime startDate(DateTime date) {
if (valid(date)) return date;
return next(date);
}