Skip to content

Commit

Permalink
fix: correct the recurrence function to be more precise on Yearly rec…
Browse files Browse the repository at this point in the history
…urrence
  • Loading branch information
gcoue committed Dec 31, 2023
1 parent 2fd5a07 commit de56562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion finalynx/simulator/recurrence.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(
months = months if months is not None else 0
years = years if years is not None else 0

self._delta = timedelta(days, weeks=4 * months + 52 * years)
self._delta = timedelta(days, weeks=4.3452 * months + 52.1429 * years+0.1429) #Ajout de 0.1429 pour rester au même jour sinon Yearly le 30 au lieu du 31/12

def _next_date(self, current_date: date) -> date:
return current_date + self._delta
Expand Down

0 comments on commit de56562

Please sign in to comment.