Extend strings API for formatted dates

Add two new functions string_catftime(), resp. string_strftime(), which
can be used to append, resp. print, a formatted date to a dynamic
string.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2017-08-21 21:07:50 +02:00
parent 0c63b4661f
commit 550a2e9379
2 changed files with 22 additions and 0 deletions

View File

@@ -1028,6 +1028,8 @@ char *string_buf(struct string *);
int string_catf(struct string *, const char *, ...);
int string_vcatf(struct string *, const char *, va_list);
int string_printf(struct string *, const char *, ...);
int string_catftime(struct string *, const char *, const struct tm *);
int string_strftime(struct string *, const char *, const struct tm *);
/* todo.c */
extern llist_t todolist;