4 int *iy,
int *im,
int *
id,
double *fd)
58 const double DJMIN = -68569.5;
59 const double DJMAX = 1e9;
62 double dj, d1, d2, f1, f2, f, d;
66 if (dj < DJMIN || dj > DJMAX)
return -1;
81 f = fmod(f1 + f2, 1.0);
82 if (f < 0.0) f += 1.0;
83 d = floor(d1 - f1) + floor(d2 - f2) + floor(f1 + f2 - f);
84 jd = (long) floor(d) + 1L;
88 n = (4L * l) / 146097L;
89 l -= (146097L * n + 3L) / 4L;
90 i = (4000L * (l + 1L)) / 1461001L;
91 l -= (1461L *
i) / 4L - 31L;
92 k = (80L * l) / 2447L;
93 *
id = (int) (l - (2447L * k) / 80L);
95 *im = (int) (k + 2L - 12L * l);
96 *iy = (int) (100L * (n - 49L) + i + l);
int eraJd2cal(double dj1, double dj2, int *iy, int *im, int *id, double *fd)