Rework message builder to format from text file.

This commit is contained in:
2023-07-01 23:10:48 -04:00
parent cb6530ff57
commit abd9be6341
5 changed files with 63 additions and 64 deletions
+18
View File
@@ -0,0 +1,18 @@
from datetime import datetime
def get_datetime(day: str) -> datetime:
"""
Takes in a string month and day and returns a datetime object of that Month/Day this year.
Args:
day (str): Month/Day in that format.
Returns:
datetime: Datetime representation of Month/Day.
"""
today = datetime.today()
month = int(day.split("/")[0])
day = int(day.split("/")[1])
return datetime(today.year, month, day)