AIRS Code Collection
Functions
doy2day.c File Reference

Convert day of year to date. More...

#include "libairs.h"

Go to the source code of this file.

Functions

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

Detailed Description

Convert day of year to date.

Definition in file doy2day.c.

Function Documentation

◆ main()

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

Definition at line 28 of file doy2day.c.

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