Handle correctly the last date in the ephemeris