#include "MisrUtil.h"
#include "MisrError.h"
#include <math.h>
#include <string.h>
Go to the source code of this file.
|
static int | leap_gregorian (int year) |
|
static double | gregorian_to_jd (int year, int month, int day) |
|
static double | mod (double a, double b) |
|
static void | jd_to_gregorian (double jd, int *y, int *m, int *d) |
|
static void | jhms (double j, int *hour, int *min, int *sec) |
|
MTKt_status | MtkJulianToCal (double jd, int *year, int *month, int *day, int *hour, int *min, int *sec) |
| Convert Julian date to calendar date. More...
|
|
◆ GREGORIAN_EPOCH
#define GREGORIAN_EPOCH 1721425.5 |
◆ gregorian_to_jd()
static double gregorian_to_jd |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day |
|
) |
| |
|
static |
◆ jd_to_gregorian()
static void jd_to_gregorian |
( |
double |
jd, |
|
|
int * |
y, |
|
|
int * |
m, |
|
|
int * |
d |
|
) |
| |
|
static |
◆ jhms()
static void jhms |
( |
double |
j, |
|
|
int * |
hour, |
|
|
int * |
min, |
|
|
int * |
sec |
|
) |
| |
|
static |
◆ leap_gregorian()
static int leap_gregorian |
( |
int |
year | ) |
|
|
static |
◆ mod()
static double mod |
( |
double |
a, |
|
|
double |
b |
|
) |
| |
|
static |
◆ MtkJulianToCal()
MTKt_status MtkJulianToCal |
( |
double |
jd, |
|
|
int * |
year, |
|
|
int * |
month, |
|
|
int * |
day, |
|
|
int * |
hour, |
|
|
int * |
min, |
|
|
int * |
sec |
|
) |
| |
Convert Julian date to calendar date.
- Returns
- MTK_SUCCESS if successful.
- Example:
- In this example, we convert from the julian date 2453728.27313 to calendar date.
- Note
- Julian date must be >= 1721119.5
- Parameters
-
[in] | jd | Julian date |
[out] | year | Year |
[out] | month | Month |
[out] | day | Day |
[out] | hour | Hour |
[out] | min | Minutes |
[out] | sec | Seconds |
Definition at line 126 of file MtkJulianToCal.c.