Fix off by one error in calculation of `mday' (months start at 1).

Jan 31 gave Jan 30, often for next year.
This commit is contained in:
bde 1995-01-31 17:54:39 +00:00
parent 1be8fd4ad3
commit 88c35f905c

View File

@ -116,7 +116,7 @@ static char *sc_token; /* scanner - token buffer */
static size_t sc_len; /* scanner - lenght of token buffer */
static int sc_tokid; /* scanner - token id */
static char rcsid[] = "$Id: parsetime.c,v 1.1 1993/12/05 11:37:05 cgd Exp $";
static char rcsid[] = "$Id: parsetime.c,v 1.1 1994/01/05 01:09:08 nate Exp $";
/* Local functions */
@ -447,7 +447,7 @@ month(tm)
*/
mon = (sc_tokid-JAN);
expect(NUMBER);
mday = atol(sc_token)-1;
mday = atol(sc_token);
if (token() == NUMBER) {
year = atol(sc_token);
token();