diff --git a/src/dodo.c b/src/dodo.c index 3214e6c..c50322e 100644 --- a/src/dodo.c +++ b/src/dodo.c @@ -1,5 +1,6 @@ #include #include +#include #include "sqlite3.h" #include "x_string.h" #include "x_curses.h" @@ -30,6 +31,20 @@ int view_all(sqlite3 *db){ return rc; } +int init_date(date *d){ + time_t rawtime; + time(&rawtime); + + struct tm *local = localtime(&rawtime); + + d->year = local->tm_year + 1900; + d->month = local->tm_mon; + d->year = local->tm_mday; + + return 0; + +} + void init_filtered_tasks(filtered_tasks* task){ task->selected_columns = NULL; task->title = NULL;