Convert day of year to date.
More...
Go to the source code of this file.
|
| int | main (int argc, char *argv[]) |
| |
Convert day of year to date.
Definition in file doy2day.c.
◆ main()
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 27 of file doy2day.c.
29 {
30
31 int day, mon;
32
33
34 if (argc < 3)
35 ERRMSG(
"Give parameters: <year> <doy>");
36
37
38 const int year = atoi(argv[1]);
39 const int doy = atoi(argv[2]);
40
41
43 printf("%d %d %d\n", year, mon, day);
44
45 return EXIT_SUCCESS;
46}
void doy2day(int year, int doy, int *mon, int *day)
Convert a day-of-year value to a calendar date.
#define ERRMSG(...)
Print an error message with contextual information and terminate the program.