diff options
| -rw-r--r-- | date.c | 1 | ||||
| -rw-r--r-- | date.h | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -2,6 +2,7 @@ #define _BSD_SOURCE enum month {JAN=1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC} month; +enum weekday {SUN=0, MON, TUE, WED, THU, FRI, SAT} weekday; Date extract_date(char *str) { Date ret; @@ -3,11 +3,13 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <time.h> typedef struct Date { int day; int month; int year; + int weekday; } Date; Date extract_date(char *str); |
