Nathan, You are welcome to test it by comparing it to some old code which can still be found on the web which I wrote in 2004 and uses java.util.Calendar to calculate JD.
"Listing 1 is FAQCalendar which subclasses java.util.Gregoriancalendar and provides methods to calculate: # Day numbers -- getJulianDay(), getUnixDay()-- which you can use to calculate the difference in calendar days. # The difference in day periods and in the temptingly "trivial to calculate" 24-hour periods -- diffDayPeriods( Calendar), get24HourPeriods(Calendar)." -- http://www.xmission.com/~goodhill/dates/deltaDates.html Note this code assumes JD is the same from midnight to midnight, the chronologist, historians, or calenderists JD, not the astronomers JD which runs from noon to noon. -Paul Stephen Colebourne wrote: > I would be happy to accept a patch adding fromModifiedJulianDays(long) > and toModifiedJulianDays() to LocalDate. > > Stephen > > > 2009/5/4 Nathaniel S. Parsons <ns...@cornell.edu>: > >>Is Joda Time interested in having this support? I've found a number of >>options online, and could code them up in Java along with some unit tests >>(and having other eyes to look at them would be helpful). >> >>-Nate >> >>On Sun, May 3, 2009 at 10:29 AM, Stephen Colebourne <scolebou...@joda.org> >>wrote: >> >>>Joda-Time doesn't have any support for converting MJD/JD >>>unfortunately, so you have to do it yourself. >>> >>>Stephen >>> >>> >>>2009/5/3 Nathaniel S. Parsons <ns...@cornell.edu>: >>> >>>>Hi, >>>> >>>>Sorry if my question comes from a misunderstanding of time or not >>>>reading >>>>the documentation, but this has been bothering me for a while. I'm >>>>trying >>>>to convert an existing app to use Joda time. Currently, it uses a ad-hoc >>>>mix >>>>of Julian Date and Modified Julian Date, stored as a single double (days >>>>since January 1, 4713 BC Greenwich noon or JD - 2400000.5). Is there a >>>>simple way to convert this to a DateTime/Instant? What chronology should >>>>I >>>>use? >>>> >>>>I'm not really interested in historical accuracy, just calculations for >>>>today and the next few months/years. >>>> >>>>Thanks, >>>>Nate >>>> >>>> >>>>------------------------------------------------------------------------------ >>>>Register Now & Save for Velocity, the Web Performance & Operations >>>>Conference from O'Reilly Media. Velocity features a full day of >>>>expert-led, hands-on workshops and two days of sessions from industry >>>>leaders in dedicated Performance & Operations tracks. Use code vel09scf >>>>and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >>>>_______________________________________________ >>>>Joda-interest mailing list >>>>Joda-interest@lists.sourceforge.net >>>>https://lists.sourceforge.net/lists/listinfo/joda-interest >>>> >>>> >>> >>> >>>------------------------------------------------------------------------------ >>>Register Now & Save for Velocity, the Web Performance & Operations >>>Conference from O'Reilly Media. Velocity features a full day of >>>expert-led, hands-on workshops and two days of sessions from industry >>>leaders in dedicated Performance & Operations tracks. Use code vel09scf >>>and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >>>_______________________________________________ >>>Joda-interest mailing list >>>Joda-interest@lists.sourceforge.net >>>https://lists.sourceforge.net/lists/listinfo/joda-interest >> >> >>------------------------------------------------------------------------------ >>Register Now & Save for Velocity, the Web Performance & Operations >>Conference from O'Reilly Media. Velocity features a full day of >>expert-led, hands-on workshops and two days of sessions from industry >>leaders in dedicated Performance & Operations tracks. Use code vel09scf >>and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >>_______________________________________________ >>Joda-interest mailing list >>Joda-interest@lists.sourceforge.net >>https://lists.sourceforge.net/lists/listinfo/joda-interest >> >> > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Joda-interest mailing list > Joda-interest@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/joda-interest > > > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.0.238 / Virus Database: 270.12.18/2096 - Release Date: 05/04/09 > 17:51:00 > ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ Joda-interest mailing list Joda-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/joda-interest