Browse Source

tente de corriger un bug sur le calcul des dates adjacentes

master
vince vince 3 years ago
parent
commit
b402197702
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      index.php

+ 3
- 3
index.php View File

@ -40,16 +40,16 @@ function findNext($start, $frequency, $excludes = [], $vsNow = true, $maxIterati
while (
(!$vsNow or ($current->getTimestamp() < $now->getTimestamp()))
and ($maxIterations-- > 0)
) $current->add($frequency);
) $current->add($frequency);
} else {
while (
(!$vsNow or ($current->getTimestamp() > $now->getTimestamp()))
and ($maxIterations-- > 0)
) $current->sub($frequency);
) $current->sub($frequency);
}
$nextEvent = $current->format('Y-m-d');
} while (
in_array($nextEvent, $excludes)
!in_array($nextEvent, $excludes)
and ($maxIterations > 0)
);
return $current;


Loading…
Cancel
Save