diff options
author | Alex Riesen <raa.lkml@gmail.com> | 2009-08-30 22:26:05 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-08-30 19:59:11 -0700 |
commit | 33012fc429af24fee64f39406d401662feb947a8 (patch) | |
tree | b74ad0a886fdc62a7123844db739d959cfc5edd8 /cache.h | |
parent | 36e4986f26d18defa51fd7af60ec7e7a98337902 (diff) | |
download | git-33012fc429af24fee64f39406d401662feb947a8.tar.gz |
Add date formatting and parsing functions relative to a given time
The main purpose is to allow predictable testing of the code.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -731,9 +731,14 @@ enum date_mode { }; const char *show_date(unsigned long time, int timezone, enum date_mode mode); +const char *show_date_relative(unsigned long time, int tz, + const struct timeval *now, + char *timebuf, + size_t timebuf_size); int parse_date(const char *date, char *buf, int bufsize); void datestamp(char *buf, int bufsize); unsigned long approxidate(const char *); +unsigned long approxidate_relative(const char *date, const struct timeval *now); enum date_mode parse_date_format(const char *format); #define IDENT_WARN_ON_NO_NAME 1 |