Fix aggregator being blank on Sundays and BS4 warnings

This commit is contained in:
2023-03-26 13:52:17 -04:00
parent f082bea571
commit c571043788
8 changed files with 58 additions and 70 deletions

View File

@ -98,7 +98,9 @@ def live_charts(
seven_days_ago = now - timedelta(days=7)
thirty_days_ago = now - timedelta(days=30)
start_of_today = datetime.combine(now, datetime.min.time(), tzinfo)
start_day_of_week = now - timedelta(days=now.today().isoweekday() % 7)
start_day_of_week = start_of_today - timedelta(
days=now.today().isoweekday() % 7
)
start_day_of_month = now.replace(day=1)
start_day_of_year = now.replace(month=1, day=1)