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);
See Implementation