Post Reply 
days-between-dates Solver equation for 17b
10-08-2018, 09:13 PM
Post: #20
RE: days-between-dates Solver equation for 17b
(10-08-2018 08:46 PM)Albert Chan Wrote:  We can use above trivia to quickly find out days apart for X century:
X = 3,4,5,6, 7,8,9,10, ... => days apart = 0,1,1,2, 3,4,4,5, ...

Y = X - 3 (note: treat March 1, 100*(X-1) as start of century X)
Days apart = 3 * floor(Y/4) + floor((Y % 4) * 2/3 + 0.5)

For year 2018, Y = X - 3 = 21 - 3 = 18
Days apart = 3 * floor(18/4) + floor(11/6) = 3*4 + 1 = 13 (match above quote)

For Julian Day Number 0 (Julian date: Jan 1, 4713 B.C.)
year = 1 - 4713 = -4712
Y = X - 3 = -47 - 3 = -50
Days apart = 3 * floor(-50/4) + floor(11/6) = -39 + 1 = -38

Excuse me if I don't get the point here, but... what's wrong with the shorter and less complicated standard formula for the Julian-Gregorian difference?

Quote:...y/100 – y/400 – 2 days

So for year –4712 that's simply –48 – (–12) – 2 = –38.

Just asking. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: days-between-dates Solver equation for 17b - Dieter - 10-08-2018 09:13 PM



User(s) browsing this thread: 2 Guest(s)