Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
which day of the week
#11
(01-02-2025, 06:42 AM)bplus Wrote: Erik did you check that?
I couldn't duplicate the error but try this instead:

Code: (Select All)
Rem determine day of week.
_ScreenMove _Middle
m$ = "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$(m$, 9 * W% + 1, 9)
  End If
Loop
End
Reply
#12
What did you change because I got the same result:

   
b = b + ...
Reply
#13
The forum editor is messing with the spaces!??

All the days should start at the same place on the 2 lines of weekdays,(when you add letter to left side so they match up) new word starts after each count of 9, they don't.
Code: (Select All)
m1$ = "Sunday   Monday   Tuesday  WednesdayThursday Friday   Saturday "
m2$ = "Friday   Saturday Sunday   Monday   Tuesday  WednesdayThursday "

Maybe it was your code m$ lines:
Code: (Select All)

m1$ = "Sunday Monday Tuesday WednesdayThursday Friday Saturday "
m2$ = "Friday Saturday Sunday Monday Tuesday WednesdayThursday "
Rem determine day of week.
_ScreenMove _Middle
'm$ = "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

and Columbus day was supposed to be Thurs yours is saying Monday after I fixed the days.
b = b + ...
Reply
#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
#15
October 12, 1492 was a Friday.  According to CoPilot.

By my calculations it is on a Monday for some reason.

Try figuring it out using a weekday program!?

Erik.
Reply
#16
I already said yours says Monday after I fixed it LOL

And get this Google AI is now saying it was Tuesday!

   
b = b + ...
Reply
#17
The difference is because we rely on False Information and trust it. And I thought never put my trust in men.

Computers nowadays are guilty of bad A.I. neural networking in our day to day lives.

-ejo
Reply
#18
Well what Genoa 'bout that!

Guys, for the record, the post I put up just used Erik's algorithm combined with my string routine.

Maybe tomorrow I can find were the one I've used for years is hiding. Unfortunately my ancestory coincides with Dav's in that we both have our roots in the Fukisit Tribe. As you'd approach their village you could here our ancestors proudly proclaiming their tribal name.... We're the Fukisit! We're the Fukisit!

Pete
Reply
#19
Well I know I'm not trusting Google AI check this out, now it's saying Sunday!!


Attached Files Image(s)
   
b = b + ...
Reply
#20
I repeat:  https://www.dayoftheweek.org/?m=October&...1492&go=Go

It was on a Wednesday by the calendar we're using now.  Dates are all over the place before, as there was a calendar switch around 100 years later...
Reply




Users browsing this thread: 10 Guest(s)