Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
which day of the week
#14
You are correct. I think the weekdays in m$ and m2$ are off by a char. Try this instead:

Code: (Select All)

Rem determine day of week.
_ScreenMove _Middle
m1$ = "Sunday Monday Tuesday WednesdayThursday Friday Saturday "
m2$ = "Friday Saturday Sunday Monday Tuesday WednesdayThursday "
Do
  Print "Enter Month,Day,Year";: Input m%, d%, y%
  If m% = 0 And d% = 0 And y% = 0 Then End
  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$(m1$, 9 * W% + 1, 9)
  End If
Loop
End
Reply


Messages In This Thread
which day of the week - by macalwen - 12-30-2024, 01:17 PM
RE: which day of the week - by SpriggsySpriggs - 12-30-2024, 03:12 PM
RE: which day of the week - by bplus - 12-30-2024, 03:16 PM
RE: which day of the week - by eoredson - 01-02-2025, 02:15 AM
RE: which day of the week - by Pete - 01-02-2025, 03:16 AM
RE: which day of the week - by bplus - 01-02-2025, 05:45 AM
RE: which day of the week - by bplus - 01-02-2025, 05:55 AM
RE: which day of the week - by SMcNeill - 01-02-2025, 06:18 AM
RE: which day of the week - by eoredson - 01-02-2025, 06:32 AM
RE: which day of the week - by bplus - 01-02-2025, 06:42 AM
RE: which day of the week - by eoredson - 01-02-2025, 07:14 AM
RE: which day of the week - by bplus - 01-02-2025, 07:25 AM
RE: which day of the week - by bplus - 01-02-2025, 07:33 AM
RE: which day of the week - by eoredson - 01-02-2025, 07:49 AM
RE: which day of the week - by eoredson - 01-02-2025, 08:13 AM
RE: which day of the week - by bplus - 01-02-2025, 08:18 AM
RE: which day of the week - by eoredson - 01-02-2025, 08:22 AM
RE: which day of the week - by Pete - 01-02-2025, 08:34 AM
RE: which day of the week - by bplus - 01-02-2025, 08:34 AM
RE: which day of the week - by SMcNeill - 01-02-2025, 10:44 AM
RE: which day of the week - by SpriggsySpriggs - 01-02-2025, 02:14 PM
RE: which day of the week - by SierraKen - 01-02-2025, 05:58 PM
RE: which day of the week - by bplus - 01-02-2025, 10:14 PM
RE: which day of the week - by Pete - 01-02-2025, 06:57 PM
RE: which day of the week - by macalwen - 01-05-2025, 11:51 AM
RE: which day of the week - by Pete - 01-06-2025, 01:48 AM



Users browsing this thread: 18 Guest(s)