From 760c297027efca75e095940d76d2078b1da1b677 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 26 Oct 2017 20:44:45 +0200 Subject: Add parse_date_interactive() Add a wrapper around parse_date() which picks the current input date format as well as the currently selected day and passes both values to parse_date(), alongside with the parameters passed to parse_date_interactive() itself. Signed-off-by: Lukas Fleischer --- src/utils.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index 11d4582..8f27756 100644 --- a/src/utils.c +++ b/src/utils.c @@ -886,6 +886,13 @@ parse_date(const char *date_string, enum datefmt datefmt, int *year, return 1; } +int +parse_date_interactive(const char *datestr, int *year, int *month, int *day) +{ + return parse_date(datestr, conf.input_datefmt, year, month, day, + ui_calendar_get_slctd_day()); +} + /* * Convert a date duration string into a number of days. * -- cgit v1.2.3-54-g00ecf