21 static int julday(
int year,
int month,
int day)
27 j1 = 1461L * (year + 4800L + (month - 14L) / 12L) / 4L;
28 j2 = 367L * (month - 2L - (month - 14L) / 12L * 12L) / 12L;
29 j3 = 3L * ((year + 4900L + (month - 14L) / 12L) / 100L) / 4L;
30 return (
int)(day - 32075L + j1 + j2 - j3);
59 scanCheck = sscanf(utc_datetime,
"%4d-%2d-%2dT%2d:%2d:%lfZ",
60 &year, &month, &day, &hours, &minutes, &seconds);
64 if (month < 1 || month > 12)
73 if (seconds > 60.99999999)
77 else if (seconds >= 60.0 && (minutes != 59 || hours != 23))
87 jdUTC[0] =
julday(year, month, day) - 0.5;
#define MTK_ERR_CODE_JUMP(code)
MTKt_status MtkUtcToUtcJd(char utc_datetime[MTKd_DATETIME_LEN], double jdUTC[2])
Convert UTC date to UTC Julian date.
static int julday(int year, int month, int day)
#define MTKd_DATETIME_LEN