| Age | Commit message (Collapse) | Author |
|
|
|
This allows the prevention of bookings fulfilling certain conditions from being
booked, if they have a negative score. This can be useful if, for instance, I
want to prevent any bookings on a given day.
-inf always compared as less than another proposed score, meaning that it would
be possible for a negative-scoring new booking to be booked as long as there
was nothing better available. This commit means that a negatively scored
booking will not be booked, even if it is the only option.
|
|
The bookings are released at 22:00 Europe/London time. When we check (>
(date-hour date) 22), we are not checking whether the time is greater than
22:00, but whether the hour 22 is greater than 22! This means that we do not
adjust the date until an hour later, when all the bookings will be gone!
Fix this by checking if the hour >= 22 instead.
|
|
Currently, shuttlebot doesn't take the number of days before the booking into
consideration, apart from not changing bookings on today's date.
To help with fixing this, add days-after Given a base date and number of days,
it will produce a consecutive list of days. Then, when searching for available
bookings, we can use this list to ask "is the date I'm booking for in the list
of days-after?"
|
|
This is useful in other functions as well, as it's essentially "better.org.uk's
definition of the current date regarding what bookings are available".
|
|
|