import mir.timestamp; auto ym0 = YearMonth(2020, Month.may); auto timestamp1 = cast(Timestamp) ym0; auto ym1 = YearMonth(timestamp1);
See Implementation