isBeforeWithPrecision method

bool isBeforeWithPrecision(
  1. Hora other, {
  2. required TimePrecision precision,
})

Checks if this date is before another with the given precision.

Implementation

bool isBeforeWithPrecision(Hora other, {required TimePrecision precision}) {
  final thisTruncated = truncateTo(precision);
  final otherTruncated = other.truncateTo(precision);
  return thisTruncated.isBefore(otherTruncated);
}