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 = 2019
Output:"Saturday"
Explanation:

Aug 31, 2019 is Saturday.

Input:day = 1, month = 1, year = 2000
Output:Saturday
Explanation:

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 = 2024
Output:Thursday
Explanation:

Feb 29, 2024 is Thursday. This tests a leap day, which only occurs every 4 years in February.

Constraints

  • 1971 ≤ year ≤ 2100

Ready to solve this problem?

Practice solo or challenge other developers in a real-time coding battle!