auto yq0 = YearQuarter(2020, Quarter.q1); auto yq1 = yq0.addYears(1); assert(yq1.year == 2021); assert(yq1.quarter == Quarter.q1); // leaves yq0 unchanged assert(yq0.year == 2020); assert(yq0.quarter == Quarter.q1);
See Implementation