summaryrefslogtreecommitdiffstats
path: root/include/timeutils.h
diff options
context:
space:
mode:
authorJ William Piggott2017-03-04 16:49:41 +0100
committerJ William Piggott2017-03-04 16:49:41 +0100
commit7088bd88323fa9152ec9fbe4089fe76807445ed3 (patch)
tree6d36f7512e7fa6a2099263351479462822b3be21 /include/timeutils.h
parentlibsmartcols: allow to add column to already used table (diff)
downloadkernel-qcow2-util-linux-7088bd88323fa9152ec9fbe4089fe76807445ed3.tar.gz
kernel-qcow2-util-linux-7088bd88323fa9152ec9fbe4089fe76807445ed3.tar.xz
kernel-qcow2-util-linux-7088bd88323fa9152ec9fbe4089fe76807445ed3.zip
lib: add parse-date.y
* include/timeutils.h Add parse-date API * lib/parse-date.y - new file Lib function that parses a date string into a timespec struct. Derived from gnulib-dd7a871 parse-datetime.y with these changes: * reduced to a single function API renamed to parse_date() * removed gnulib dependencies * removed debugging * converted to util-linux coding style * include/cctype.h - new file Like ctype.h only hard coded to the 'C' locale. Used by lib/parse-date.y. Derived from gnulib-dd7a871 c-ctype.h with these changes: * removed gnulib dependencies * converted to util-linux coding style * add requisite util-linux constants Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'include/timeutils.h')
-rw-r--r--include/timeutils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/timeutils.h b/include/timeutils.h
index 85fc228db..874f853b7 100644
--- a/include/timeutils.h
+++ b/include/timeutils.h
@@ -82,4 +82,6 @@ int strtime_short(const time_t *t, struct timeval *now, int flags, char *buf, si
extern time_t timegm(struct tm *tm);
#endif
+int parse_date(struct timespec *, char const *, struct timespec const *);
+
#endif /* UTIL_LINUX_TIME_UTIL_H */