inRange method

bool inRange(
  1. DateTime from,
  2. DateTime to,
  3. DateTime comp
)

check if dates are in range

Implementation

bool inRange(DateTime from, DateTime to, DateTime comp) {
  return comp.isAfter(from) && comp.isBefore(to);
}