JavaScript Ephemeris - Notes

Note: This is a mirror copy of the original web page, uploaded with permission of Peter Hayes

Last update 30 November 2015

Copyright Peter Hayes 1999-2015.


Location, Date and Time


The code has been tested with the following browsers -


The following references were of use in the coding.

Several people have kindly pointed out errors, suggested improvements and supplied code. The main contributors were Stephane Macrez and Nick Reid.


Latest changes are also documented on the main page, this is the full history.

Source Notes

If you want to keep your own copy you need to save the files listed below. If you click on the link with the right button you usually find a "save as" or "save target" option on the menu. Please read the copyright notice if you want to use the source on a public web page. Many of the functions have a parameter obs which is an observatory object as defined below. If you write your own code remember that you will need to make a copy (my code shows how) because the object is passed as a reference object.

Links to Translations and other sites

Sites I used to test my own code are

US Naval Observatory
heavens-above a site for all sorts of astronomical tables and diagrams.

For those who want skymaps on your own computer I have used and recommend Stellarium free for Mac OS X, Linux and Windows.
If you want sun and moon data with a map to set your location try The Photographers Ephemeris
This web page was last updated 03/07/17