03-20-2024, 04:25 PM
Hello z-s,
I looked at your Golden Project: calandar.
This program needs a makeover, i did some tests which gives wrong anwers:
1. For today 2024-03-20 your program gives Tuesday, but it is Wednesday.
2 For the consecutive days 2024-02-29 and 2024-03-01 both are Thursday !
3. For the last day of 2023 (23023-12-31) the program gives NO answer.
Some hints:
check if the input numbers are in the allowed range (month 15 or day 99) are accepted now)
You can replace all 93 lines for the calculation of d with one line, look at the Math.Remainder() function
Also for the calculation of b from the year with some attention for leap years.
HTH
I looked at your Golden Project: calandar.
This program needs a makeover, i did some tests which gives wrong anwers:
1. For today 2024-03-20 your program gives Tuesday, but it is Wednesday.
2 For the consecutive days 2024-02-29 and 2024-03-01 both are Thursday !
3. For the last day of 2023 (23023-12-31) the program gives NO answer.
Some hints:
check if the input numbers are in the allowed range (month 15 or day 99) are accepted now)
You can replace all 93 lines for the calculation of d with one line, look at the Math.Remainder() function
Also for the calculation of b from the year with some attention for leap years.
HTH