Including 1752 is problematic, in the British Empire, it was the only year with 355 days, as September 3–13 were skipped when the Empire adopted the Gregorian calendar.
These skipped days were a rolling problem across the world, when they were applied varied by country and religion of the recorder of historic accounts - they were by no means uniformly applied in the same year across the planet.
I like the story of how the portuguese sailed east, and the spanish sailed west, and by the time they met each other (Macau trading with Manila?) there was a day dislocation between the two empires. Nowadays we have timezones and an International Date Line* to solve the underlying issue, but back then it seems as if no one was surprised that calendars would be off by certain numbers of days between ports, and merely took it in stride.
* shout out to Kiribati (UTC+14)! I'd like to think the bronze age danes rocked their string skirts in much the same way the Kiribati do their "grass" [pandanus] ones. https://www.youtube.com/watch?v=ZUhs1TdHMt0
# Enter a date (yyyy-mm-dd): 2024-05-24
# The day of the week for 2024-05-24 is Friday.
def compute_day_of_week(date):
def day_of_week_string(day_index): # Prompt for the datedate_input = input("Enter a date (yyyy-mm-dd): ")
year, month, day = map(int, date_input.split('-'))
date = (day, month, year)
# Compute and print the day of the week
day_index = compute_day_of_week(date) day_name = day_of_week_string(day_index) print(f"The day of the week for {date_input} is {day_name}.")