MCPcopy Create free account
hub / github.com/6tail/lunar-java / getJulianDay

Method getJulianDay

src/main/java/com/nlf/calendar/Solar.java:558–573  ·  view source on GitHub ↗

获取儒略日 @return 儒略日

()

Source from the content-addressed store, hash-verified

556 * @return 儒略日
557 */
558 public double getJulianDay() {
559 int y = this.year;
560 int m = this.month;
561 double d = this.day + ((this.second * 1D / 60 + this.minute) / 60 + this.hour) / 24;
562 int n = 0;
563 boolean g = y * 372 + m * 31 + (int) d >= 588829;
564 if (m <= 2) {
565 m += 12;
566 y--;
567 }
568 if (g) {
569 n = (int) (y * 1D / 100);
570 n = 2 - n + (int) (n * 1D / 4);
571 }
572 return (int) (365.25 * (y + 4716)) + (int) (30.6001 * (m + 1)) + d + n - 1524.5;
573 }
574
575 @Override
576 public String toString() {

Callers 3

testSolar2JDMethod · 0.95
computeDayMethod · 0.95
getWeekMethod · 0.95

Calls

no outgoing calls

Tested by 1

testSolar2JDMethod · 0.76