subtract method

  1. @useResult
LocalDateTime subtract(
  1. Duration duration
)

Returns a copy of this with the duration subtracted.

final date = LocalDateTime(2023, 4, 1, 20, 3);
date.minus(Duration(days: 1, hours: 2)); // 2023-03-31 18:03

Implementation

@useResult LocalDateTime subtract(Duration duration) => LocalDateTime._(_native.subtract(duration));