endDateAdapter<T extends Every, V extends DateValidator> static method
Returns the end date considering the given every and validator base
process.
If the validator is valid for the date, it will be returned.
If not, the previous date will be returned considering the every base
process.
Implementation
static DateTime endDateAdapter<T extends Every, V extends DateValidator>(
T every,
V validator,
DateTime date, {
required DateTime? limit,
}) {
if (validator.valid(date)) return date;
return previous(every, date, limit: limit);
}