Expand account list

This commit is contained in:
James Cole
2024-03-04 20:41:34 +01:00
parent ea573e9434
commit 88a9bc379e
17 changed files with 581 additions and 26 deletions

View File

@@ -79,13 +79,14 @@ trait CalculateXOccurrencesSince
while ($total < $count) {
$domCorrected = min($dayOfMonth, $mutator->daysInMonth);
$mutator->day = $domCorrected;
app('log')->debug(sprintf('Mutator is now %s', $mutator->format('Y-m-d')));
if (0 === $attempts % $skipMod && $mutator->gte($afterDate)) {
app('log')->debug('Is added to the list.');
$return[] = clone $mutator;
++$total;
}
++$attempts;
$mutator = $mutator->endOfMonth()->addDay();
app('log')->debug(sprintf('Mutator is now %s', $mutator->format('Y-m-d')));
}
return $return;