reducePast static method

DateTime reducePast(
  1. DateTime value,
  2. DateTime element
)

Reduces a list of dates to the newest date.

Implementation

static DateTime reducePast(DateTime value, DateTime element) {
  return value.isAfter(element) ? value : element;
}