11-30-2024, 03:36 AM
Code to determine what day Christmas of 2024 is on:
Code: (Select All)
Rem determine day of week Christmas of 2024 is:
m% = 12 ' month
d% = 26 ' day
y% = 2024 ' year
If m% < 3 Then m% = m% + 12: y% = y% - 1
W% = ((13 * m% + 3) \ 5 + d% + y% + y% \ 4 - y% \ 100 + y% \ 400 + 1) Mod 7
Select Case W%
Case 0
WeekDayLong$ = "Sunday"
Case 1
WeekDayLong$ = "Monday"
Case 2
WeekDayLong$ = "Tuesday"
Case 3
WeekDayLong$ = "Wednesday"
Case 4
WeekDayLong$ = "Thursday"
Case 5
WeekDayLong$ = "Friday"
Case 6
WeekDayLong$ = "Saturday"
End Select
Print "Christmas of 2024 is on: "; WeekDayLong$
End