minus method

  1. @useResult
LocalDateTime minus({
  1. int years = 0,
  2. int months = 0,
  3. int days = 0,
  4. int hours = 0,
  5. int minutes = 0,
  6. int seconds = 0,
  7. int milliseconds = 0,
  8. int microseconds = 0,
})

Returns a copy of this with the units of time subtracted.

final date = LocalDateTime(2023, 4, 10, 8);
date.minus(months: -1, hours: 1); // 2023-05-10 07:00

Implementation

@useResult LocalDateTime minus({int years = 0, int months = 0, int days = 0, int hours = 0, int minutes = 0, int seconds = 0, int milliseconds = 0, int microseconds = 0}) =>
  LocalDateTime._(_native.minus(
    years: years,
    months: months,
    days: days,
    hours: hours,
    minutes: minutes,
    seconds: seconds,
    milliseconds: milliseconds,
    microseconds: microseconds,
  ));