AIRS Code Collection
Functions
day2doy.c File Reference

Convert date to day of year. More...

#include "libairs.h"

Go to the source code of this file.

Functions

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

Detailed Description

Convert date to day of year.

Definition in file day2doy.c.

Function Documentation

◆ main()

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

Definition at line 28 of file day2doy.c.

30 {
31
32 int doy;
33
34 /* Check arguments... */
35 if (argc < 4)
36 ERRMSG("Give parameters: <year> <mon> <day>");
37
38 /* Read arguments... */
39 const int year = atoi(argv[1]);
40 const int mon = atoi(argv[2]);
41 const int day = atoi(argv[3]);
42
43 /* Convert... */
44 day2doy(year, mon, day, &doy);
45 printf("%d %d\n", year, doy);
46
47 return EXIT_SUCCESS;
48}
#define ERRMSG(...)
Print error message and quit program.
Definition: jurassic.h:237
void day2doy(int year, int mon, int day, int *doy)
Get day of year from date.
Definition: libairs.c:304
Here is the call graph for this function: