mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Support DATETIME - TIME
This commit is contained in:
@@ -1761,9 +1761,11 @@ the original \fBDATE\fR.
|
||||
earlier
|
||||
than the original \fBTIME\fR.
|
||||
.PP
|
||||
\fBDATETIME\fR - \fBINT\fR - returns a \fBDATETIME\fR that is \fBINT\fR minutes
|
||||
earlier
|
||||
than the original \fBDATETIME\fR.
|
||||
\fBDATETIME\fR - \fBINT\fR - returns a \fBDATETIME\fR that is
|
||||
\fBINT\fR minutes earlier than the original \fBDATETIME\fR.
|
||||
.PP
|
||||
\fBDATETIME\fR - \fBTIME\fR - coerces the \fBTIME\fR to an \fBINT\fR
|
||||
and then performs subtraction as above.
|
||||
.RE
|
||||
.TP
|
||||
.B <, <=, >, and >=
|
||||
|
||||
@@ -854,8 +854,9 @@ static int Subtract(void)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/* If it's a datetime minus an int, do subtraction, checking for underflow */
|
||||
if (v1.type == DATETIME_TYPE && v2.type == INT_TYPE) {
|
||||
/* If it's a datetime minus an int or a time, do subtraction,
|
||||
* checking for underflow */
|
||||
if (v1.type == DATETIME_TYPE && (v2.type == INT_TYPE || v2.type == TIME_TYPE)) {
|
||||
v1.v.val -= v2.v.val;
|
||||
if (v1.v.val < 0) return E_DATE_OVER;
|
||||
PushValStack(v1);
|
||||
|
||||
Reference in New Issue
Block a user