auto yq0 = YearQuarter(2020, Quarter.q1); yq0.add!"quarters"(1); assert(yq0.year == 2020); assert(yq0.quarter == Quarter.q2); auto yq1 = yq0.add!"quarters"(1); assert(yq1.year == 2020); assert(yq1.quarter == Quarter.q3); // also changes yq0 assert(yq0.year == 2020); assert(yq0.quarter == Quarter.q3); yq1.add!"quarters"(2); assert(yq1.year == 2021); assert(yq1.quarter == Quarter.q1); yq1.add!"quarters"(-5); assert(yq1.year == 2019); assert(yq1.quarter == Quarter.q4);