Closed cusher closed 5 months ago
I will take a look!
Btw, I can add more utility methods to make it less terse and will do so!
@cusher new methods:
public static Instant fromMJD(final double mjd) {
return JulianDay.ofModifiedJulianDay(mjd).toInstant();
}
public static double toMJD(final Instant instant) {
return JulianDay.ofInstant(instant).valueAsModifiedJulianDay().toDouble();
}
Releasing 7.2.0 atm
Looks good, thanks!
We have a time conversion class
Time
with a handful of methods for convertingInstant
to/from other formats we use, including MJD. I'll include the relevant parts here.With
jodd.time.JulianDate
:I updated this to test using
jodd.julianday.JulianDay
in it's place with:A bit less terse, but that's not an issue.
The following test, which used to pass, now fails:
The first assertion passes, as does the
57754.0
check, but the rest are off by a small rounding error.Don't have much time to look further into this at the moment, but passing it along at least.