checkIsDateBefore static method

bool? checkIsDateBefore({
  1. required dynamic fromDate,
  2. required dynamic toDate,
})

Check if the param fromDate is before the param toDate. Both fromDate and toDate need be a object of DateTime or LunarDateTime. If passing another type the result will return null.

Implementation

static bool? checkIsDateBefore(
    {required dynamic fromDate, required dynamic toDate}) {
  var r = _rangeDate(fromDate, toDate);
  return (r == null) ? null : (r > 0);
}