I have a function in python and i need to create like this function in basic code:
import datetime
def isHoliday(date):
holidays = [
datetime.date(2023, 1, 1), # New Year's Day
datetime.date(2023, 4, 17), # Easter Monday
datetime.date(2023, 5, 1), # Labor Day
datetime.date(2023, 5, 8), # Victory in Europe Day
datetime.date(2023, 5, 25), # Ascension Day
datetime.date(2023, 6, 5), # Whit Monday
datetime.date(2023, 7, 14), # Bastille Day
datetime.date(2023, 8, 15), # Assumption of Mary
datetime.date(2023, 11, 1), # All Saints' Day
datetime.date(2023, 11, 11), # Armistice Day
datetime.date(2023, 12, 25), # Christmas Day
]
return date in holidays
the function return if the today’s date in holiday or not and then i will send an email if it’s not