Skip to content

Commit

Permalink
fix leap year issue where I was assuming a year was 365 days despite …
Browse files Browse the repository at this point in the history
…knowing better :)
  • Loading branch information
geekygirldawn committed Mar 13, 2024
1 parent b0b546b commit 4c68085
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion health_by_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
import argparse
import sys
import pandas as pd
import datetime
import calendar
from utils.augur_connect import augur_db_connect
from utils.date_calcs import get_dates
from utils.repo_info import get_repo_info, fork_archive, get_org_repos
Expand Down Expand Up @@ -93,7 +95,7 @@
print('Parameters: Years =', years, 'Business Days', bus_days)

# Get the dates for the analysis using the years argument if provided
days = 365 * years
days = 365 + calendar.isleap(year=datetime.datetime.now().year)
start_date, end_date = get_dates(days)

# Create the connection to the Augur database
Expand Down

0 comments on commit 4c68085

Please sign in to comment.