subtractYears method

DateTime subtractYears(
  1. int yearDifference
)

减去年份

Implementation

DateTime subtractYears(int yearDifference) {
  final int year = this.year - yearDifference;
  final int day = this.day + 1;
  return DateTime(year, month, day);
}