Day of the Week
Return the name of the weekday of the given date, as one of "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday". Known anchor: January 1, 2000 was a Saturday.
Example 1
day 31
month 8
year 2019
returns "Saturday"
A Saturday.
Constraints
1971 <= year <= 2100- The date is valid
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More Math problems
- Fast PowerMedium
- Friday the 13th CountMedium
- Last Digit of a PowerMedium
- Last Person StandingMedium
- Minimum Moves to Equal ElementsMedium
- Multiply StringsMedium
- Power ModMedium
- Trailing Zeroes in FactorialMedium