Propogate the ``call mktime'' flag from adjwday() down to adjday().
Submitted by: Christian Weisgerber <naddy@mips.inka.de>
This commit is contained in:
parent
4a97e2b82b
commit
7ecff35b0d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user