获取儒略日 @return 儒略日
()
| 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() { |
no outgoing calls