prevMonth method

DateTime prevMonth()

前一个月

Implementation

DateTime prevMonth() {
  final month = this.month - 1;
  final year = this.year;
  return DateTime(month < 1 ? year - 1 : year, month < 1 ? 12 : month);
}