(50g) Week day / Season begin / Mean / True ecliptic / Julian Day / Astron Nutation
|
04-10-2022, 09:53 AM
(This post was last modified: 02-27-2023 04:12 PM by Gil.)
Post: #13
|
|||
|
|||
RE: (50g) Week day / Season begin / Mean / True ecliptic / Julian Day / Astron Nutation
Correction
for present weekday calculation. For the special case -4713.0101 (January 1 BCE), the weekday calculated is correct, but the date shown was induly transformed into -4713.0102. —> Issue fixed up now. —> Corresponding new code: \<< "1 Input: yyyy.mmdd no year < -4713 ! " DROP DUP -4713.0101 == 1 0 IFTE \-> k \<< .0001 k * - 0 \->JD ROT DROP2 2 + k - 7 MOD DUP { Sun Mon Tue Wed Thu Fri Sat } SWAP 1 + GET SWAP R\->I \->TAG k .0001 * ROT + "y.mmdd" \->TAG SWAP \>> \>> The name of that program in Ephemerid Directory was changed into —>WK2.D. It is to be found at the very end of EPHEMERID Directory. The reason: A completely new program, using mathematician John Conway (died from Covid on 11 April 2020) Doomsday algorithm, was developed under the name —>WK.D. The input is as in the previous program. The pro: you don't need any more to calculate previously the Astronomical Julian Day; you can now enter any valid *date. (*The year zero does not exist, as when you start something, the year in question is never zero, but year 1— though that non existing year zero in real life is used internally here for computing purposes —, December 31, year -1, being therefore followed by January 1, year +1 * as previously, the date after October 4 1582, Julian Calendar, is October 15,1582, Gregorian Calendar) In other words dates before January 1st 4713 BCE are now allowed; for instance -88888.0131 will return correctly Tuesday. (See for checking: https://keisan.casio.com/exec/system/1247132711) The corresponding code — now corrected in bold —, for that completely new, unlimited program —>WK.D: \<< "1 Input: yyyy.mmdd any year, even <-4713 ! \[]No Year 0 31.12 yr-1 follow. by 01.01 yr+1 \[]1582.1004 followed by 1582.1015 (Jul\->Greg) " DROP "yyyy.mmdd" \->TAG DUP DUP IP SWAP FP ABS 100 * DUP FP 100 * SWAP IP ROT 100 / DUP IP SWAP FP 100 * DUP 0 \<= 1 0 IFTE + DUP2 SWAP 100 * + \-> d m Y y Yy \<< y DUP 2 MOD 0 \=/ 11 0 IFTE + 2 / DUP 2 MOD 0 \=/ 11 0 IFTE + 7 SWAP 7 MOD - Yy 1582 < Yy 1582 == m 10 < AND OR Yy 1582 == m 10 == AND d 5 \<= AND OR IF THEN Y NEG 7 MOD Yy 4 MOD 0 == 1 0 IFTE ELSE Y 4 MOD \-> YM \<< CASE YM 0 == THEN 2 END YM 1 == THEN 0 END YM 2 == THEN 5 END YM 3 == THEN 3 END END \>> IF y 0 \=/ THEN y 4 MOD 0 == 1 0 IFTE ELSE Yy 400 MOD 0 == 1 0 IFTE END END \-> ly \<< + d CASE m 1 == THEN 3 ly + END m 2 == THEN 0 ly + END m 3 == THEN 0 END m 4 == THEN 4 END m 5 == THEN 9 END m 6 == THEN 6 END m 7 == THEN 4 END m 8 == THEN 8 END m 9 == THEN 5 END m 10 == THEN 10 END m 11 == THEN 0 END 12 END - + 7 MOD DUP { Sun Mon Tue Wed Thu Fri Sat } SWAP 1 + GET SWAP R\->I \->TAG \>> \>> \>> Now all 1st of each month of each odd year from -4701 (BCE) to 4701 (ACE) give the same and correct results (weekdays) with both programs —>WK.D and —>WK2.D. In fact, you could leave the version running via Julian Day calculation, as nowadays conventions for the months and their lengths are not to be found nor valid as such in the past. The attached correct files should be WKneuB.Doc EPHEMERID.Ver.Xi3c.Doc (c and not b) Should errors occurr, please inform me to check and correct the issue. Regards, Gil Campart |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)