0

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!

Keppil
  • 45,603
  • 8
  • 97
  • 119
maximladus
  • 157
  • 2
  • 7
  • 19

2 Answers2

2

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

nkcode
  • 361
  • 3
  • 12
1

You can use joda-time to convert between a Julian date like the one you have and any other calendar:

http://joda-time.sourceforge.net/cal_julian.html

You can also use this function:

http://www.rgagnon.com/javadetails/java-0506.html

jspcal
  • 50,847
  • 7
  • 72
  • 76