Search code examples
javaeclipsejulian-date

Interpretation of Julian Date in Java


I am trying to adjust a code at work, the issue I face is with JAVA script using Eclipse. I cannot understand how Julian Date or Number is there calculated or chosen because I need to adjust it.

Any suggestions on this brainer?

An example would be:

jToday=2456324.5

Thank you very much for your input!


Solution

  • You can use Joda lib to convert Julian days to java date

    DateTime dt =  new DateTime(DateTimeUtils.fromJulianDay(2456324.5));
    

    Julian date - number before decimal point represent number of days since noon on January 1, 4713 BC, and after decimal point fraction of the day; For example, the Julian Date for 1.1.2013 UT 0:30:00, is 2456293.520833