diff --git a/agenda/birthday.py b/agenda/birthday.py index 80a401d..13c81ac 100644 --- a/agenda/birthday.py +++ b/agenda/birthday.py @@ -3,6 +3,7 @@ from datetime import date import yaml +from rich.pretty import pprint from .types import Event @@ -28,12 +29,13 @@ def get_birthdays(from_date: date, filepath: str) -> list[Event]: for entity in entities: birthday = date(**entity["birthday"]) bday, age = next_birthday(from_date, birthday) - events.append( - Event( - date=bday, - name="birthday", - title=f'{entity["label"]} (aged {age})', + for offset in range(2): + events.append( + Event( + date=bday.replace(year=bday.year + offset), + name="birthday", + title=f'{entity["label"]} (aged {age + offset})', + ) ) - ) return events