AIRS Code Collection
Functions
doy2day.c File Reference

Convert day of year to date. More...

#include "jurassic.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 27 of file doy2day.c.

29 {
30
31 int day, mon;
32
33 /* Check arguments... */
34 if (argc < 3)
35 ERRMSG("Give parameters: <year> <doy>");
36
37 /* Read arguments... */
38 const int year = atoi(argv[1]);
39 const int doy = atoi(argv[2]);
40
41 /* Convert... */
42 doy2day(year, doy, &mon, &day);
43 printf("%d %d %d\n", year, mon, day);
44
45 return EXIT_SUCCESS;
46}