Skip to content

Commit

Permalink
Merge pull request #66 from DrBu7cher/add-iteration-shortcut
Browse files Browse the repository at this point in the history
feat(iteration): add shortcut for iterating over dates
  • Loading branch information
JonasWanke authored Jan 28, 2024
2 parents f557fe9 + ca0a4de commit e14a62c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/iteration/iteration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ Iterable<DateTime> getRecurrenceRuleInstances(
var count = rrule.count;

var currentStart = start;

if (count == null && after != null) {
// Shortcut for not calculating unnecessary recurrences.
currentStart = after;
}

var timeSet = makeTimeSet(rrule, start.timeOfDay);

// ignore: literal_only_boolean_expressions
Expand Down

0 comments on commit e14a62c

Please sign in to comment.