diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-01-11 22:10:48 +0000 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-01-11 22:10:48 +0000 |
commit | c8af480f52b46e556d23ef012f3987aa3a0fc25b (patch) | |
tree | a744542a7b58f87912ad811cd6b0c0743512fbe1 /src/args.c | |
parent | b8779e714a18b00e5c3f8172e1c425570ff8acf0 (diff) | |
download | calcurse-c8af480f52b46e556d23ef012f3987aa3a0fc25b.tar.gz calcurse-c8af480f52b46e556d23ef012f3987aa3a0fc25b.zip |
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.
Diffstat (limited to 'src/args.c')
-rwxr-xr-x | src/args.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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--; |