LEGAL STUFF: Feel free to copy and use the JavaScript code written for this webpage. All I ask is that the header at the at the beginning of the JavaScript code section (below) is kept intact and is present in whatever you use it for. If you just want to add a link to my homepage instead, let me know so that I can put a link to your homepage too! 

What is a Julian Date?

Everyone knows how to use the conventional date system with seven days a week, about 30 days a month, and 12 months a year (or at least I hope everyone does!). Such a system is very confusing - some months have 31 days, some 30, and the number of days in February change almost every four years! Most people learned and starting using this complicated date system at a very young age, so they face little or no problems with it. However programming a computer with such variable dates is a very difficult task indeed! Which is why we had to choose the simple way out: the Julian Date! In fact, the whole of science is about choosing the easy way out! But I digress... my apologies. On this web page I shall explain and apply Julian Dates (JD) in context with astronomical dating methods, although a JD is (I am told) a more general concept.

In astronomy, a JD is defined as the contiguous count of days from January 1, 4713 B.C., Greenwich Mean Noon (equal to zero hours Universal Time). The fraction of each day is represented as a decimal number. Hence noon (GMT) on January 2, 4713 B.C. would have JD 1.00000, 6.00 pm GMT on the same day would have JD 1.25000 and 6.00 hours Universal Time would have JD 2443509.75. Simple, right?

Well, not quite so simple. The irregularity of the conventional date system makes the date conversion formulae to find JD's rather tedious and complex. Being a sophomore at College, I am in no position to derive these formulae myself. The formulae used were given to me during our first semester Observational Astronomy Laboratory taught by Dr. G. McCook, Chair, Department of Astronomy, Villanova University. I simply wrote the JavaScript code that implements these formulae and lets the computer do the number crunching. After all, that's what computers are good at, right?

Also you may ask, what's so special about January 1, 4713 B.C.? Well, according to Kevin Bourque, this day was chosen because, amongst other reasons, it is the most recent day in which the year began on a Sunday with a full moon. In addition, Kenneth Silverstein points out that the Julian Day count was:

According to one of my professors, there are hardly any scientific records of astronomical phenomena prior to that date anyway, so it seems like a good starting point. If anyone has further opinions, please let me know by e-mail!

Calendar (Gregorian) Dates to Julian Dates

This JavaScript code calculates the Julian Date for a given Universal (GMT + 12 hours) Date and Time. Enter the date in the correct syntax (examples are given below) and then click "Calculate Julian Date". Valid from 1801 to 2099.

Example (with time specified): December 25, 1990 19:30:00
Example (without time specified): April 1, 1993

Enter date:

Fine print: Netscape's documentation says that JavaScript's Date object is for handling dates after 1/1/1970, and so earlier dates might not work. However, so far all dates prior to 1970 seem to have worked for me. Also, the Julian Date calculation formula is supposedly accurate only for the years 1800 - 2100 AD.

Julian Dates to Calendar (Gregorian) Dates

This JavaScript code converts Julian Dates back to normal Calendar (Gregorian) dates. The output is in GMT (Universal - 12 hours) time.

Example: 2443509.5

Enter Julian date:

Fine print: Again, according to Netscape's website, JavaScript's Date object wasn't created to work with dates prior to 1/1/1970. My tests have indicated no problems so far, but I cannot guarantee that this will work everytime.

Code written by Rahul Mittal, Villanova University, Villanova, PA 19085.
Visit my homepage at http://www.rasteroid.com/ or contact me by e-mail at rasteroid@hotmail.com if you have questions, comments or suggestions.