datetime_to_mjd_years¶
- giant.catalogs.utilities.datetime_to_mjd_years(date)[source]¶
This function converts a python datetime objects to the number of SI years since the MJD Epoch of November 17, 1858.
This is computed by computing the time delta between the
MJD_EPOCH
and the input datetime object, and then usingtimedelta_to_si_years()
to convert to the fractional years since the epoch.- Parameters:
date (datetime) – the python datetime object to be converted to MJD years
- Returns:
the number of SI years since November 17, 1858
- Return type:
float