Given:
Determine which day of the week the given date falls on.
The days of the week are represented using letters from A to Z.
The first day of the year is considered the first day of the week.
daysInYear — total number of days in the year.
daysInMonth — number of days in each month.
daysInWeek — number of days in a week.
A date consisting of:
daymonthyearReturn the corresponding day of the week represented by a character from A to Z.
Suppose:
daysInYear = 365
daysInMonth = 30
daysInWeek = 7
date = 2/3/2025
Calculate the number of days elapsed before the given date and use modulo daysInWeek to determine its weekday.
If the calculated weekday index is:
0 → A
1 → B
2 → C
3 → D
4 → E
5 → F
6 → G
then return the corresponding character.
The exact date format and whether the input contains one fixed number of days per month or actual month lengths should be confirmed from the original question.
Willingness • Pending