Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What day is Christmas on
#1
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
Reply


Messages In This Thread
What day is Christmas on - by eoredson - 11-30-2024, 03:36 AM



Users browsing this thread: 2 Guest(s)