Can't understand how to compare DateTime with opCmp
FG via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Feb 1 07:18:53 PST 2015
On 2015-02-01 at 16:04, Suliman wrote:
> opCmp(in DateTime rhs);
>
> what is rhs?
RHS is probably short of "right hand side", ie. the argument on the right side of the operator in a binary operator expression. In `a < b` it would be b.
> I am trying to do something like this:
> if( DateTime.opCmp(dtindb, outoftime));
>
> But it's seems that I wrong understand how to use this function...
No. That would be `if (dtindb.opCmp(outoftime))`, but it's simpler to write `if (dtindb < outoftime)`
More information about the Digitalmars-d-learn
mailing list