3 int eraCal2jd(
int iy,
int im,
int id,
double *djm0,
double *djm)
54 const int IYMIN = -4799;
57 static const int mtab[]
58 = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
64 if (iy < IYMIN)
return -1;
65 if (im < 1 || im > 12)
return -2;
68 ly = ((im == 2) && !(iy%4) && (iy%100 || !(iy%400)));
71 if ( (
id < 1) || (
id > (mtab[im-1] + ly))) j = -3;
75 iypmy = (long) (iy + my);
77 *djm = (double)((1461L * (iypmy + 4800L)) / 4L
78 + (367L * (
long) (im - 2 - 12 * my)) / 12L
79 - (3L * ((iypmy + 4900L) / 100L)) / 4L
80 + (
long)
id - 2432076L);
int eraCal2jd(int iy, int im, int id, double *djm0, double *djm)