(01-02-2025, 05:55 AM)bplus Wrote: Columbus discovered America, at least the Bahamas, Oct 12, 1492.Sure, then all you have to do is modify it to:
What day was that?
Pete and probably Eirk's say Wedesday, Macalwen says Friday again. Bplus says best to diccover new lands on Fridays.
BTW Google's AI says it was on a Thursday!
Google must of averaged macalwen's and Pete's answers.
Code: (Select All)
Rem determine day of week.
m$ = "Sunday Monday Tuesday WednesdayThursday Friday Saturday"
m2$ = "Friday Saturday Sunday Monday Tuesday WednesdayThursday"
Print "Enter Month,Day,Year";: Input m%, d%, y%
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
If y% < 1582 Or (y% = 1582 And m% <= 10 And d% <= 4) Then
Print "Weekday is on: "; Mid$(m2$, 9 * W% + 1, 9)
Else
Print "Weekday is on: "; Mid$(m$, 9 * W% + 1, 9)
End If
End