diff --git a/agenda/data.py b/agenda/data.py index 38346e2..c776c42 100644 --- a/agenda/data.py +++ b/agenda/data.py @@ -360,7 +360,7 @@ async def get_data( two_weeks_ago = today - timedelta(weeks=2) last_week = today - timedelta(weeks=1) last_year = today - timedelta(days=365) - next_year = today + timedelta(days=2 * 365) + next_year = today + timedelta(days=365) minus_365 = now - timedelta(days=365) plus_365 = now + timedelta(days=365) @@ -478,7 +478,9 @@ async def get_data( busy_events = [ e for e in sorted(events, key=lambda e: e.as_date) - if e.as_date > today and e.as_date < next_year and busy_event(e) + if e.as_date > today + and e.as_date < (today + timedelta(days=365 * 2)) + and busy_event(e) ] gaps = find_gaps(busy_events) diff --git a/templates/index.html b/templates/index.html index 2dcf2c8..fdc2336 100644 --- a/templates/index.html +++ b/templates/index.html @@ -171,13 +171,8 @@