diff options
author | Karel Zak | 2016-05-24 13:21:26 +0200 |
---|---|---|
committer | Karel Zak | 2016-05-24 13:21:26 +0200 |
commit | eee665bb5a4fb648d29d9f2fafb0490d46617053 (patch) | |
tree | 1936e9a96597f75f91f7c87ae27d37d7c0fd93e3 /include/timeutils.h | |
parent | tests: refresh cal(1) test (diff) | |
download | kernel-qcow2-util-linux-eee665bb5a4fb648d29d9f2fafb0490d46617053.tar.gz kernel-qcow2-util-linux-eee665bb5a4fb648d29d9f2fafb0490d46617053.tar.xz kernel-qcow2-util-linux-eee665bb5a4fb648d29d9f2fafb0490d46617053.zip |
lib/timeutils: add strtime_short()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/timeutils.h')
-rw-r--r-- | include/timeutils.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 */ |