JURASSIC
Functions
jsec2time.c File Reference

Convert Julian seconds to date. More...

#include "jurassic.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Convert Julian seconds to date.

Definition in file jsec2time.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 27 of file jsec2time.c.

29 {
30
31 double remain;
32
33 int day, hour, min, mon, sec, year;
34
35 /* Check arguments... */
36 if (argc < 2)
37 ERRMSG("Give parameters: <jsec>");
38
39 /* Read arguments... */
40 double jsec = atof(argv[1]);
41
42 /* Convert time... */
43 jsec2time(jsec, &year, &mon, &day, &hour, &min, &sec, &remain);
44 printf("%d %d %d %d %d %d %g\n", year, mon, day, hour, min, sec, remain);
45
46 return EXIT_SUCCESS;
47}
void jsec2time(const double jsec, int *year, int *mon, int *day, int *hour, int *min, int *sec, double *remain)
Convert seconds to date.
Definition: jurassic.c:3973
#define ERRMSG(...)
Print error message and quit program.
Definition: jurassic.h:237
Here is the call graph for this function: