MPTRAC
Functions
day2doy.c File Reference

Convert date to day of year. More...

#include "mptrac.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 /* Check arguments... */
32 if (argc < 4)
33 ERRMSG("Give parameters: <year> <mon> <day>");
34
35 /* Read arguments... */
36 int year = atoi(argv[1]);
37 int mon = atoi(argv[2]);
38 int day = atoi(argv[3]);
39
40 /* Convert... */
41 int doy;
42 day2doy(year, mon, day, &doy);
43 printf("%d %d\n", year, doy);
44
45 return EXIT_SUCCESS;
46}
void day2doy(const int year, const int mon, const int day, int *doy)
Get day of year from date.
Definition: mptrac.c:852
#define ERRMSG(...)
Print an error message with contextual information and terminate the program.
Definition: mptrac.h:1881
Here is the call graph for this function: