The OpenD Programming Language

YearMonth.opCmp

struct YearMonth
const pure nothrow @nogc @safe
int
opCmp

Examples

auto ym = YearMonth(2000, Month.nov);
assert(ym.opCmp(YearMonth(2000, Month.nov)) == 0);
assert(ym.opCmp(YearMonth(2000, Month.oct)) == 1);
assert(ym.opCmp(YearMonth(2000, Month.dec)) == -1);
assert(ym.opCmp(YearMonth(2001, Month.nov)) == -1);

Meta