fix: use isBefore method rather than the compare for readability (and fix a bug)

This commit is contained in:
Joey Boerwinkel 2024-07-26 11:44:45 +02:00
parent ec47ed4696
commit 5f5a4a47aa

View file

@ -94,7 +94,7 @@ class AvailabilityModel {
/// Verify the validity of this availability
void validate() {
if (startDate.compareTo(endDate) < 0) {
if (!startDate.isBefore(endDate)) {
throw AvailabilityEndBeforeStartException();
}