Skip to content

Commit

Permalink
removed a date function that was only used in the old bus factor code…
Browse files Browse the repository at this point in the history
… and is no longer used anywhere else
  • Loading branch information
geekygirldawn committed Nov 23, 2023
1 parent 8b06276 commit ace0308
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions utils/date_calcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,36 +45,9 @@ def get_dates(days):

return start_date, end_date

def convert_to_dt(start_date, end_date):
""" Converts start and end dates to datetime objects
Parameters
----------
start_date : str
end_date : str
Returns
-------
start_dt : datetime
end_dt : datetime
"""
from datetime import datetime, timezone

# inputs will be date strings, output tz aware datetime

end_dt = datetime.strptime(end_date, "'%Y-%m-%d'").replace(tzinfo=timezone.utc)

start_dt = datetime.strptime(start_date, "'%Y-%m-%d'").replace(tzinfo=timezone.utc)

return start_dt, end_dt

def convert_dates(start_date, end_date):
""" Converts start and end dates to datetime objects.
This is different from the other function that does this, but
I don't remember why :)
Parameters
----------
start_date : str
Expand Down

0 comments on commit ace0308

Please sign in to comment.