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