GardenHub
GardenHub copied to clipboard
Don't let people make unreasonable orders
When a user schedules an order for harvest, they select the start date and end date for when they'd like their crops to be harvested.
Currently, there is one restriction: you can't choose a date before today. Obviously, we can't pick your vegetables backwards in time.
However, people could also make unreasonable orders like this:
-
start date: today, end date: today. If they make this order at 6pm it will be impossible to fulfill their request. How soon is too soon to make an order? I'd say at the very least we need 24 hours of notice.
-
start date: January 1, 2020, end date: January 10, 2020 This is not really that unreasonable since we'll probably still be alive and gardenhub will be operational. But how far in the future is too far?
-
start date: saturday, end date: sunday Do people work on weekends? I'm guessing probably not, so we'll need to shoot back an error if the start or end date falls on a weekend.