next<T extends Every> static method

DateTime next<T extends Every>(
  1. T every,
  2. DateTime date, {
  3. required DateTime? limit,
})

Returns the next date considering the given every base process. If every is a LimitedEvery, the limit will be passed on.

Implementation

static DateTime next<T extends Every>(
  T every,
  DateTime date, {
  required DateTime? limit,
}) {
  if (every is! LimitedEvery) return every.next(date);
  return every.next(date, limit: limit);
}