Created
October 27, 2020 17:00
-
-
Save AnnikaNoren/63ec5c399a455dc84f26b1a0b9561b5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
from datetime import datetime | |
import calendar | |
def has_friday_13(month, year): | |
date = f'{month} 13 {year}'.format() | |
spooky = datetime.strptime(date, '%m %d %Y').weekday() | |
return (calendar.day_name[spooky]) == "Friday" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment