Description
Given a date as day, month and year, return the corresponding day of the week for that date. The answer is one of "Sunday", "Monday", etc.
Examples
Input:
day = 31, month = 8, year = 2019Output:
"Saturday"Explanation:
Aug 31, 2019 is Saturday.
Input:
day = 1, month = 1, year = 2000Output:
SaturdayExplanation:
Jan 1, 2000 is Saturday. This tests the beginning of a leap year and the start of a new millennium.
Input:
day = 29, month = 2, year = 2024Output:
ThursdayExplanation:
Feb 29, 2024 is Thursday. This tests a leap day, which only occurs every 4 years in February.
Constraints
- •
1971 ≤ year ≤ 2100