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 <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2017-10-26 20:44:45 +02:00
parent eddee590ec
commit 760c297027
3 changed files with 13 additions and 8 deletions

View File

@@ -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.
*