diff --git a/man/remind.1.in b/man/remind.1.in index d0a87974..bab8f93e 100644 --- a/man/remind.1.in +++ b/man/remind.1.in @@ -515,10 +515,12 @@ In other words, \fB\-i\fIvar\fR is exactly the same as \fB\-i\fIvar\fR\fB=\fR0. Allows you to define a function on the command line. .PP If you supply a \fIdate\fR on the command line, it must consist of -\fIday month year\fR, where \fIday\fR is the day of the month, +[\fIday\fR] \fImonth\fR [\fIyear\fR], where \fIday\fR is the day of the month, \fImonth\fR is at least the first three letters of the English name of the month, and \fIyear\fR is a year (all 4 digits) from 1990 to about 2075. You can leave out the \fIday\fR, which then defaults to 1. +If you leave out the year, then it defaults to the current year. You +cannot leave out the \fImonth\fR. .PP If you do supply a \fIdate\fR on the command line, then \fBRemind\fR uses it, rather than the actual system date, as its notion of "today." diff --git a/src/init.c b/src/init.c index 264619eb..33036baa 100644 --- a/src/init.c +++ b/src/init.c @@ -806,16 +806,13 @@ void InitRemind(int argc, char const *argv[]) if (dse != NO_DATE) { FromDSE(dse, &y, &m, &d); } -/* Must supply date in the form: day, mon, yr OR mon, yr */ + /* Must supply date in the form: day, mon, yr OR mon, yr */ if (m != NO_MON || y != NO_YR || d != NO_DAY) { - if (m == NO_MON || y == NO_YR) { - if (rep == NO_REP) Usage(); - else if (m != NO_MON || y != NO_YR) Usage(); - else { - m = CurMon; - y = CurYear; - if (d == NO_DAY) d = CurDay; - } + if (y == NO_YR) { + y = CurYear; + } + if (m == NO_MON) { + Usage(); } if (d == NO_DAY) d=1; if (d > DaysInMonth(m, y)) {