operator - method

DateTime operator -(
  1. Duration duration
)

Subtracts this duration of time from this date and returns the result.

Example: "2023-08-24".toDate - 7.day -> 2023-08-17.

Implementation

DateTime operator -(Duration duration) => subtract(duration);