Next / Previous / Contents / Shipman's homepage

10. class MJD: Modified Julian date

This class represents a Modified Julian Date, which is defined as the Julian date minus 2,400,000.5.

10.1. MJD.__init__(): Constructor

To create an MJD instance, use this calling sequence:

MJD(m, f=None)

The argument m may be either a float or an int. If you would like to carry extra precision, you can pass the integral part as m and the fraction as f. The integral and fractional parts are carried separately inside the object, so that finding the difference between two MJD instances gives you a full 15 digits after the decimal.