summaryrefslogtreecommitdiff
path: root/src/entry.h
diff options
context:
space:
mode:
authorlouie <lshprung@tutanota.com>2023-07-02 17:16:59 -0700
committerlouie <lshprung@tutanota.com>2023-07-02 17:16:59 -0700
commit795301860f3a2a36e66396f2c57552f16d5c170b (patch)
tree130a8c93a3c5c2d8dc60ce9706d87afc0c8bfe73 /src/entry.h
parent8190e3286a3379746f02425979459eb5de136703 (diff)
Use 'struct tm' for date in entries
Diffstat (limited to 'src/entry.h')
-rw-r--r--src/entry.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/entry.h b/src/entry.h
index a2f637e..298b9b4 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -2,12 +2,13 @@
#define ENTRY_H
#include <stdbool.h>
+#include <time.h>
#include "../config.h"
// a group/category for entries to be put in
typedef struct {
- //TODO due_date
+ struct tm due_date;
char alt_due_date[BUF_LEN];
char title[BUF_LEN];
char color[BUF_LEN]; // TODO consider making an enum
@@ -17,6 +18,7 @@ typedef struct {
} Entry;
// getters
+struct tm entry_get_due_date(Entry *e);
char *entry_get_alt_due_date(Entry *e);
char *entry_get_title(Entry *e);
char *entry_get_color(Entry *e);
@@ -25,6 +27,7 @@ bool entry_get_done(Entry *e);
char *entry_get_url(Entry *e);
// setters
+void entry_set_due_date(Entry *e, struct tm due_date);
void entry_set_alt_due_date(Entry *e, char *alt_due_date);
void entry_set_title(Entry *e, char *title);
void entry_set_color(Entry *e, char *color);