Fixed bug in calendar date to MJD conversion function