diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit edb6b50f0afb2ce279c43e72b2667210e7232187
parent f040be3adecd03c9d504fa302f7039d151531378
Author: in0rdr <andreas.gruhler@uzh.ch>
Date:   Thu, 15 Dec 2016 15:32:52 +0100

Merge commit 'c5812c1'

Diffstat:
Mdiary.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/diary.c b/diary.c @@ -7,6 +7,8 @@ struct tm curs_date; struct tm cal_start; struct tm cal_end; +#define DATE_FMT "%Y-%m-%d" + void setup_cal_timeframe() { raw_time = time(NULL); @@ -216,7 +218,7 @@ bool is_leap(int year) void get_date_str(struct tm* date, char* date_str, size_t date_str_size) { - strftime(date_str, date_str_size, "%Y-%m-%d", date); + strftime(date_str, date_str_size, DATE_FMT, date); } /* Writes file path for 'date' entry to 'rpath'. '*rpath' is NULL on error. */