getMonth method

  1. @override
ChineseDateTime getMonth(
  1. int year,
  2. int month
)
override

Returns a DateTime with the given year and month.

Implementation

@override
ChineseDateTime getMonth(int year, int month) {
  // Flutter carries an ordinal into another year; its thirteenth month
  // maps to the final month when the destination has only twelve.
  if (month == 13 && ChineseDateTime.monthsInYear(year) == 12) month = 12;
  return ChineseDateTime(year, month);
}