auto d = YearMonthDay(2020, Month.may, 31); auto ym = d.YearMonth; assert(ym.year == 2020); assert(ym.month == Month.may);
See Implementation