summary refs log tree commit diff
path: root/src/usr.bin/calendar
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-27 16:35:04 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-27 16:35:04 +0200
commitfeae86e913b4dfa4b5552e255fba290f99586949 (patch)
tree233a97f9b3f962fb25354fd6e4a8f19df12d5feb /src/usr.bin/calendar
parente66a7f9fab601e35d435e97e450e647d92cc05ae (diff)
downloadoutils-feae86e913b4dfa4b5552e255fba290f99586949.tar.gz
outils-feae86e913b4dfa4b5552e255fba290f99586949.tar.xz
outils-feae86e913b4dfa4b5552e255fba290f99586949.zip
cvs update v0.5
Diffstat (limited to 'src/usr.bin/calendar')
-rw-r--r--src/usr.bin/calendar/day.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/usr.bin/calendar/day.c b/src/usr.bin/calendar/day.c
index cea9709..7e8da77 100644
--- a/src/usr.bin/calendar/day.c
+++ b/src/usr.bin/calendar/day.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: day.c,v 1.32 2015/12/08 19:04:50 mmcc Exp $	*/
+/*	$OpenBSD: day.c,v 1.33 2016/07/13 21:32:01 millert Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -543,8 +543,9 @@ isnow(char *endp, int bodun)
 				tdiff = difftime(ttmp, f_time)/ SECSPERDAY;
 				if (tdiff <= offset + f_dayAfter ||
 				    (bodun && tdiff == -1)) {
-					if (tdiff >=  0 ||
-					    (bodun && tdiff == -1)) {
+					if ((tmtmp.tm_mon == month) &&
+					    (tdiff >=  0 ||
+					    (bodun && tdiff == -1))) {
 					if ((tmp = malloc(sizeof(struct match))) == NULL)
 						err(1, NULL);
 					tmp->when = ttmp;