cta_datetime.h File Reference
Interface description of the default COSTA datetime component.
More...
#include <time.h>
#include "cta_handles.h"
#include "cta_datatypes.h"
#include "cta_system.h"
Go to the source code of this file.
Defines |
#define | MJDREF 2400000.5 |
Functions |
CTAEXPORT int | CTA_DateTime_GregorianToJulian (int year, int month, int day, int hour, int minute, int second, double *jd) |
| Julian day number from Gregorian date.
|
CTAEXPORT int | CTA_DateTime_GregorianToModifiedJulian (int year, int month, int day, int hour, int minute, int second, double *mjd) |
| Modified Julian day number from Gregorian date.
|
CTAEXPORT int | CTA_DateTime_DaysToHMS (double days, int *hour, int *minute, int *second) |
| Convert days into hours, minutes, and seconds.
|
CTAEXPORT int | CTA_DateTime_ModifiedJulianToJulian (double mjd, double *jd) |
| Julian day number from Modified Julian day number.
|
CTAEXPORT int | CTA_DateTime_JulianToGregorian (double jd, int *year, int *month, int *day, int *hour, int *minute, int *second) |
| Gregorian calendar date from Julian day number.
|
CTAEXPORT int | CTA_DateTime_ModifiedJulianToGregorian (double mjd, int *year, int *month, int *day, int *hour, int *minute, int *second) |
| Gregorian calendar date from Modified Julian day number.
|
Detailed Description
Interface description of the default COSTA datetime component.
A datetime object describes a date and time object
Definition in file cta_datetime.h.
Define Documentation
Function Documentation
CTAEXPORT int CTA_DateTime_DaysToHMS |
( |
double |
days, |
|
|
int * |
hour, |
|
|
int * |
minute, |
|
|
int * |
second | |
|
) |
| | |
Convert days into hours, minutes, and seconds.
- Parameters:
-
| days | I Year |
| hour | O Hour |
| minute | O Minute |
| second | O Second |
- Returns:
- error status: CTA_OK if successful
CTAEXPORT int CTA_DateTime_GregorianToJulian |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day, |
|
|
int |
hour, |
|
|
int |
minute, |
|
|
int |
second, |
|
|
double * |
jd | |
|
) |
| | |
Julian day number from Gregorian date.
- Parameters:
-
| year | I Year |
| month | I Month |
| day | I Day |
| hour | I Hour |
| minute | I Minute |
| second | I Second |
| jd | O Julian day number |
- Returns:
- error status: CTA_OK if successful
CTAEXPORT int CTA_DateTime_GregorianToModifiedJulian |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day, |
|
|
int |
hour, |
|
|
int |
minute, |
|
|
int |
second, |
|
|
double * |
mjd | |
|
) |
| | |
Modified Julian day number from Gregorian date.
- Parameters:
-
| year | I Year |
| month | I Month |
| day | I Day |
| hour | I Hour |
| minute | I Minute |
| second | I Second |
| mjd | O Modified Julian day number |
- Returns:
- error status: CTA_OK if successful
CTAEXPORT int CTA_DateTime_JulianToGregorian |
( |
double |
jd, |
|
|
int * |
year, |
|
|
int * |
month, |
|
|
int * |
day, |
|
|
int * |
hour, |
|
|
int * |
minute, |
|
|
int * |
second | |
|
) |
| | |
Gregorian calendar date from Julian day number.
- Parameters:
-
| jd | I Julian day number |
| year | O Year |
| month | O Month |
| day | O Day |
| hour | O Hour |
| minute | O Minute |
| second | O Second |
| jd | O Julian day number |
- Returns:
- error status: CTA_OK if successful
CTAEXPORT int CTA_DateTime_ModifiedJulianToGregorian |
( |
double |
mjd, |
|
|
int * |
year, |
|
|
int * |
month, |
|
|
int * |
day, |
|
|
int * |
hour, |
|
|
int * |
minute, |
|
|
int * |
second | |
|
) |
| | |
Gregorian calendar date from Modified Julian day number.
- Parameters:
-
| mjd | I Modified Julian day number |
| year | O Year |
| month | O Month |
| day | O Day |
| hour | O Hour |
| minute | O Minute |
| second | O Second |
- Returns:
- error status: CTA_OK if successful
CTAEXPORT int CTA_DateTime_ModifiedJulianToJulian |
( |
double |
mjd, |
|
|
double * |
jd | |
|
) |
| | |
Julian day number from Modified Julian day number.
- Parameters:
-
| mjd | I Modified Julian day number |
| jd | O Julian day number |
- Returns:
- error status: CTA_OK if successful