summaryrefslogtreecommitdiff
path: root/bin/date
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-05-23 23:58:18 +0000
committerBrian Somers <brian@FreeBSD.org>2000-05-23 23:58:18 +0000
commit7ecff35b0d88fb1aea2cefd4ff859bf505f529ff (patch)
tree8058624f4a76c12fa438970341769ef501829265 /bin/date
parent4a97e2b82b5916373f5e78f7a5f6cc34271c5f72 (diff)
Notes
Diffstat (limited to 'bin/date')
-rw-r--r--bin/date/vary.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/date/vary.c b/bin/date/vary.c
index 4e46d1b2f6ce..7fba4221116b 100644
--- a/bin/date/vary.c
+++ b/bin/date/vary.c
@@ -257,7 +257,7 @@ adjwday(struct tm *t, char type, int val, int istext, int mk)
val -= t->tm_wday; /* later this week */
else
val *= 7; /* "-v+5w" == "5 weeks in the future" */
- return !val || adjday(t, '+', val, 0);
+ return !val || adjday(t, '+', val, mk);
case '-':
if (istext) {
if (val > t->tm_wday)
@@ -266,14 +266,14 @@ adjwday(struct tm *t, char type, int val, int istext, int mk)
val = t->tm_wday - val; /* early this week */
} else
val *= 7; /* "-v-5w" == "5 weeks ago" */
- return !val || adjday(t, '-', val, 0);
+ return !val || adjday(t, '-', val, mk);
default:
if (val < t->tm_wday)
- return adjday(t, '-', t->tm_wday - val, 0);
+ return adjday(t, '-', t->tm_wday - val, mk);
else if (val > 6)
return 0;
else if (val > t->tm_wday)
- return adjday(t, '+', val - t->tm_wday, 0);
+ return adjday(t, '+', val - t->tm_wday, mk);
}
return 1;
}