+ 3
What should I do with a weekday finder that calculates BCE 'one more than' AD?
I am confused with the result - 15 August 1947 BCE is Saturday. (Edited: It was wrong, instead, it should be Friday) But, I surely know that 15 August 1947 AD is Friday. Is there any modification needed for the code? If so, please answer me. The program is as follows: https://code.sololearn.com/cVmK517y0L2g/#java You will not understand the code unless you watch the video - https://www.youtube.com/watch?v=714LTMNJy5M I have extended it to BCE. I have excluded the year 0 as mentioned in - https://en.wikipedia.org/wiki/Year_zero Please help me.
1 Odpowiedź
+ 2
I have found the answer myself-
"If you can’t figure out why you keep getting a different answer than the Doomsday Calculator on any date B.C.E.," ... "don’t forget to subtract one from the year before placing a negative sign in front of it to account for the fact that there is no year 0 in the Gregorian calendar. For example, August 16, 1783 B.C.E. would be input into the Doomsday Calculator as 8/16/-1782. Also, if you still aren’t getting the same answer, make sure that you input the correct number for the month."
It was the last point in the warning section of
https://www.wikihow.com/Calculate-the-Day-of-the-Week
From the Year Zero article of Wikipedia, I have concluded that I have to express the year as assigned by the astronomers, i.e., 1 BCE as 0, etc.
Still, if there is any inconsistency or other flaw in my code, please note it down in the answer section of this thread.