Converting Julian Date to Gregorian
Date: 03/20/2001 at 06:13:06 From: max prenga Subject: Converting Julian date to Gregorian date Please help me to convert a Julian date into a Gregorian date. Assume that the base date is 01/01/0001 and that a Gregorian date is expressed as DD/MM/YYYY. Cheers
Date: 03/20/2001 at 13:21:36 From: Doctor Rob Subject: Re: Converting Julian date to Gregorian date Thanks for writing to Ask Dr. Math, Max. Your mention of a base date is confusing and apparently immaterial to the calculation you ask for. In the 21st and 20th centuries, just add 13 days to the Julian date to get the Gregorian date. In the 19th century, it was 12 days. In the 18th century, it was 11 days. In the 17th and 16th centuries, it was 10 days. In the Nth century, add [[3*N/4]] - 2 days. Here [[x]] means the greatest integer less than or equal to x, that is, x rounded down to an integer. The points where things hiccup are on 29 Feb 1900, 29 Feb 1800, 29 Feb 1700, 29 Feb 1500, and so on, which exist in the Gregorian calendar but not the Julian. Example: Sept. 3, 1752 in the Julian calendar would be Sept. 14, 1752 in the Gregorian calendar, because 3 + [[3*18/4]] - 2 = 14. For more on calendar calculations, see the following Web page from our Frequently Asked Questions (FAQ): The Calendar and the Days of the Week http://mathforum.org/dr.math/faq/faq.calendar.html - Doctor Rob, The Math Forum http://mathforum.org/dr.math/
Date: 03/22/2001 at 03:48:44 From: Max Prenga Subject: Re: Converting Julian date to Gregorian date Thanks for your reply; however, there seems to be a wee bit of confusion, as I was not referring to the historical phenomena of Julian and Gregorian CALENDARS, rather I was referring to the abstract concept of a Julian and Gregorian DATE. A Julian date refers to the number of days from a base date as given by a Gregorian date. For example, if a Gregorian date is 30/01/0001 and the base date is 01/01/0001 then the Julian date is 30 days. My query relates to working the other way. That is, given a Julian date of 10,457 days and given a base date of 01/01/0001 then what formula/logic can be used to obtain the Gregorian date of 08/08/0029 (assuming no leap years .... which is an INCORRECT assumption). Look forward to hearing from you soon.
Date: 03/22/2001 at 12:15:14 From: Doctor Rob Subject: Re: Converting Julian date to Gregorian date Thanks for writing back. The confusion here is due to terminology. What you describe is usually called the Julian day or Julian day number, not the Julian date. To convert from Julian day number to Gregorian date, first divide by 365.2425, and round the quotient down to the nearest integer. Thus if the Julian day number were 704876, the quotient would be 1929.8849... which rounds down to 1929. The year is one larger than this, 1930. Now the number of days in those 1929 Gregorian years is 1929*365 + [[1929/4]] - [[1929/100]] + [[1929/400]] = 704085 + 482 - 19 + 4, = 704552. The first term counts the number of days in those years not counting leap years. The second term counts leap years every four years. The third term subtracts for the nonleap years in centurial years, and the fourth term adds for the leap years in quadricenturial years. This follows the Gregorian rules for determining what years are leap years. That leaves 704876 - 704552 = 324 days in 1930 to be accounted for. This amounts to about 324*12/365 = 10.65 months, or 10 months and some days. The ten months January through October in a nonleap year consist of 304 days. Then 324 - 304 = 20 days will be in November, and so the Gregorian date is November 20, 1930. To sum this up in formulas, let the Julian day number be N. Then set y = [[N/365.2425]], YYYY = y + 1, z = 365*y + [[y/4]] - [[y/100]] + [[y/400]], d = N - z. To find the month MM, start with d and subtract 31, 28 (or 29 in leap years YYYY), 31, 30, 31, 30, 31, 31, 30, 31, 30, and 31, successively, until you first get a result which is zero or negative. The month MM is the number of subtractions you have done, and the last positive subtraction result is the day DD. The date is then DD/MM/YYYY. - Doctor Rob, The Math Forum http://mathforum.org/dr.math/
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994-2015 The Math Forum