operator - method

DateTime operator -(
  1. Duration duration
)

Returns a new DateTime object having subtracted the given duration.

Example:

DateTime(2020, 1, 1) - 2.days; // 30th Dec 2019

Implementation

DateTime operator -(Duration duration) {
  return subtract(duration);
}