summaryrefslogtreecommitdiffstats
path: root/src/args.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-01-11 22:10:48 +0000
committerLukas Fleischer <calcurse@cryptocrack.de>2011-01-11 22:10:48 +0000
commitc8af480f52b46e556d23ef012f3987aa3a0fc25b (patch)
treea744542a7b58f87912ad811cd6b0c0743512fbe1 /src/args.c
parentb8779e714a18b00e5c3f8172e1c425570ff8acf0 (diff)
downloadcalcurse-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-xsrc/args.c6
1 files changed, 3 insertions, 3 deletions
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--;