stepFunc static method

DateTime stepFunc(
  1. DateTime date,
  2. int steps,
  3. int preferDay
)

Implementation

static DateTime stepFunc(DateTime date, int steps, int preferDay) {
  if (!steps.isNegative) return _add(date, steps, preferDay);
  return _subtract(date, steps, preferDay);
}