Julian Date Number/Gregorian Calendar Date Conversions
03-07-2019, 07:17 PM (This post was last modified: 03-09-2019 02:00 AM by Albert Chan.)
Post: #6
 Albert Chan Senior Member Posts: 2,625 Joined: Jul 2018
RE: Julian Date Number/Gregorian Calendar Date Conversions
(01-14-2019 01:21 AM)Eddie W. Shore Wrote:  Gregorian Date: 1999, January 11
JD: 2451190

Gregorian Date: 2017, March 21
JD: 2457834

If we also know what weekday the date is, we can get JDN easily:

Using Rata Die calendar days (proleptic Gregorian date Jan 1, 0001 (Monday) as day 1)

RD ≈ round(((y-1) + (m-1)/12) * 365.2425) + (d-1)
max error ±2 days, removed by matching actual weekdays.

JDN = 1721425 + RD

A quick way to do modulo 7, using 10 ≡ 3, 10² ≡ 2, 10³ ≡ -1 (mod 7)
Example: 123456789 (mod 7) ≡ 123 - 456 + 789 ≡ 456 ≡ 2*4 + 3*5 + 6 ≡ 1 + 1 - 1 ≡ 1

For 1999, January 11, Monday:
RD ≈ round((1998 + 0/12) * 365.2425) + 10 ≈ 729765
729765 (mod 7) ≡ 765 - 729 ≡ 36 ≡ 1 (matched Monday)
-> JDN = 1721425 + 729765 = 2451190

For 2017, March 21, Tuesday:
RD ≈ round((2016 + 2/12) * 365.2425) + 20 ≈ 736410
736410 (mod 7) ≡ 410 - 736 ≡ 2(4-7) + 3(1-3) - 6 ≡ 1 + 1 + 1 ≡ 3 (should be Tuesday)
-> RD = 736410 - 1 = 736409
-> JDN = 1721425 + 736409 = 2457834
 « Next Oldest | Next Newest »

 Messages In This Thread Julian Date Number/Gregorian Calendar Date Conversions - Eddie W. Shore - 01-14-2019, 01:21 AM RE: Julian Date Number/Gregorian Calendar Date Conversions - Dieter - 01-14-2019, 12:01 PM RE: Julian Date Number/Gregorian Calendar Date Conversions - Joe Horn - 01-14-2019, 11:13 PM RE: Julian Date Number/Gregorian Calendar Date Conversions - Eddie W. Shore - 01-16-2019, 02:48 PM RE: Julian Date Number/Gregorian Calendar Date Conversions - cdmackay - 01-16-2019, 08:18 PM RE: Julian Date Number/Gregorian Calendar Date Conversions - Albert Chan - 03-07-2019 07:17 PM

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