Skip to content

Commit

Permalink
Simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nickevansuk committed Oct 3, 2023
1 parent 6d17b58 commit 5d389cc
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ const { InternalCriteriaFutureScheduledAndDoesNotRequireDetails } = require('./i
function mustHaveBookingWindowAndBeOutsideOfIt(offer, opportunity, options) {
const dateAfterWhichBookingsCanBeMade = getDateAfterWhichBookingsCanBeMade(offer, opportunity);
const dateBeforeWhichBookingsCanBeMade = getDateBeforeWhichBookingsCanBeMade(offer, opportunity);
if (dateAfterWhichBookingsCanBeMade == null && dateBeforeWhichBookingsCanBeMade == null) {
return false; // has no booking window
}
/* If, within 2 hours, the booking window would be reached, it may be possible for this to happen
during the test run. So, to be on the safe side, we only accept Opportunities whose booking window
starts at least 2 hours in the future. */
Expand Down

0 comments on commit 5d389cc

Please sign in to comment.