AIRS Code Collection
Functions
day2doy.c File Reference

Convert date to day of year. More...

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

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