From 8a7f0b666fc749166421669fba62b1000321bd26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 8 Apr 2023 11:35:24 +0200 Subject: date: remove approxidate_relative() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When 29f4332e66 (Quit passing 'now' to date code, 2019-09-11) removed its timeval parameter, approxidate_relative() became equivalent to approxidate(). Convert its last two call sites and remove the redundant function. Signed-off-by: RenĂ© Scharfe Signed-off-by: Junio C Hamano --- date.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'date.c') diff --git a/date.c b/date.c index 6f45eeb356..923e62cfd2 100644 --- a/date.c +++ b/date.c @@ -1365,20 +1365,6 @@ static timestamp_t approxidate_str(const char *date, return (timestamp_t)update_tm(&tm, &now, 0); } -timestamp_t approxidate_relative(const char *date) -{ - struct timeval tv; - timestamp_t timestamp; - int offset; - int errors = 0; - - if (!parse_date_basic(date, ×tamp, &offset)) - return timestamp; - - get_time(&tv); - return approxidate_str(date, (const struct timeval *) &tv, &errors); -} - timestamp_t approxidate_careful(const char *date, int *error_ret) { struct timeval tv; -- cgit v1.2.3