Go to the documentation of this file.
35 #define IGREG1 (15L + 31L * (10L + 12L * 1582L))
40 int32_t
y, m, adj, date;
56 date = (int32_t) floor(365.25 *
y) + (int32_t) (30.6001 * m) +
57 (int32_t)
day + 1720995
L;
59 if ((int32_t)
day + 31 * ((int32_t) month + 12 * (int32_t)
year) >
IGREG1) {
60 adj = (int32_t) (0.01 *
y);
61 date = date + 2 - adj + (int32_t) (0.25 * adj);
72 #define IGREG2 2299161L
79 int32_t
ja,
jb, jc,
jd, je, jalpha;
84 jalpha = (int32_t) (((
julian - 1867216
L) - 0.25) / 36524.25);
85 ja =
julian + 1 + jalpha - (int32_t) (0.25 * jalpha);
89 jc = (int32_t) (6680.0 + ((
jb - 2439870
L) - 122.1) / 365.25);
90 jd = 365 * jc + (int32_t) (0.25 * jc);
91 je = (int32_t) ((
jb -
jd) / 30.6001);
93 *
day =
jb -
jd - (int32_t) (30.6001 * je);
int32_t julday(int year, int month, int day)
integer function julian(DAY, MONTH, YEAR)
void caldat(int32_t julian, int *year, int *month, int *day)