From eee665bb5a4fb648d29d9f2fafb0490d46617053 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 24 May 2016 13:21:26 +0200 Subject: lib/timeutils: add strtime_short() Signed-off-by: Karel Zak --- include/timeutils.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/timeutils.h') diff --git a/include/timeutils.h b/include/timeutils.h index 2ec193a09..265577f5e 100644 --- a/include/timeutils.h +++ b/include/timeutils.h @@ -70,4 +70,11 @@ int strtimeval_iso(struct timeval *tv, int flags, char *buf, size_t bufsz); int strtm_iso(struct tm *tm, int flags, char *buf, size_t bufsz); int strtime_iso(const time_t *t, int flags, char *buf, size_t bufsz); +#define UL_SHORTTIME_THISYEAR_HHMM (1 << 1) + +int time_is_today(const time_t *t, struct timeval *now); +int time_is_thisyear(const time_t *t, struct timeval *now); + +int strtime_short(const time_t *t, struct timeval *now, int flags, char *buf, size_t bufsz); + #endif /* UTIL_LINUX_TIME_UTIL_H */ -- cgit v1.2.3-55-g7522