Rework message builder to format from text file.
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user