diff options
author | brian <brian@FreeBSD.org> | 2000-05-23 23:58:18 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-05-23 23:58:18 +0000 |
commit | de828c2a55edea3c8bc328d49ceacc7059095431 (patch) | |
tree | 29cfac481935826a235bd2041283a80abc3d67b2 /bin/date | |
parent | 38eca3fc40435f855087b5312021b49147241864 (diff) | |
download | FreeBSD-src-de828c2a55edea3c8bc328d49ceacc7059095431.zip FreeBSD-src-de828c2a55edea3c8bc328d49ceacc7059095431.tar.gz |
Propogate the ``call mktime'' flag from adjwday() down to adjday().
Submitted by: Christian Weisgerber <naddy@mips.inka.de>
Diffstat (limited to 'bin/date')
-rw-r--r-- | bin/date/vary.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/date/vary.c b/bin/date/vary.c index 4e46d1b2..7fba422 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; } |