From c8af480f52b46e556d23ef012f3987aa3a0fc25b Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 11 Jan 2011 22:10:48 +0000 Subject: Make parse_date accept several short forms. Short forms are only accepted in interactive mode (e.g. when using the "Go to" function, editing a recurrent item's end date, and so on). Samples: "1/1/30" for "01/01/2030", "26" for the 26th of the currently selected month/year or "3/1" for Mar 01 (or Jan 03, depending on the date format) of the currently selected year. --- src/args.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/args.c') diff --git a/src/args.c b/src/args.c index 1f4bd0e..f2c3361 100755 --- a/src/args.c +++ b/src/args.c @@ -1,4 +1,4 @@ -/* $calcurse: args.c,v 1.63 2010/05/26 18:18:28 culot Exp $ */ +/* $calcurse: args.c,v 1.64 2011/01/11 22:10:48 fleischer Exp $ */ /* * Calcurse - text-based organizer @@ -578,7 +578,7 @@ date_arg (char *ddate, int add_line, int print_note, struct conf *conf, else { /* a date was entered */ if (parse_date (ddate, conf->input_datefmt, (int *)&day.yyyy, - (int *)&day.mm, (int *)&day.dd)) + (int *)&day.mm, (int *)&day.dd, NULL)) { app_found = app_arg (add_line, &day, 0, print_note, conf, regex); } @@ -630,7 +630,7 @@ date_arg_extended (char *startday, char *range, int add_line, int print_note, if (startday != NULL) { if (parse_date (startday, conf->input_datefmt, (int *)&t.tm_year, - (int *)&t.tm_mon, (int *)&t.tm_mday)) + (int *)&t.tm_mon, (int *)&t.tm_mday, NULL)) { t.tm_year -= 1900; t.tm_mon--; -- cgit v1.2.3-54-g00ecf