isBefore method

bool isBefore(
  1. TimeWrapper wrapper, {
  2. bool alsoEqual = true,
})

Implementation

bool isBefore(TimeWrapper wrapper, {bool alsoEqual = true}) {
  if (alsoEqual) {
    return toDateTime().isBefore(wrapper.toDateTime()) || toDateTime().isAtSameMomentAs(wrapper.toDateTime());
  }
  return toDateTime().isBefore(wrapper.toDateTime());
}