YearMonth.dateTime constructor

YearMonth.dateTime(
  1. DateTime dateTime
)

Inspect DateTime object and convert back to YearMonth

Implementation

factory YearMonth.dateTime(DateTime dateTime) =>
    YearMonth(dateTime.year, dateTime.month);