MPTRAC
Functions
doy2day.c File Reference

Convert day of year to date. More...

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