Resolve Date Time
In this example we are loading reservations from an external source. Usually we will not have the location of the bars as something static. The reservations will have a begin date/time and an end date/time and you will need to resolve the relative location after loading.
So once the reservations loaded we map through them and use resolve functions to figure out the row, column and length. Of course these are example functions and you will need to write your own based off of what libraries you are using
With resolveDateDiff we figure out the length between the start of the reservation and its end and the time between the start of the calendar and the start of the reservation
With resolveRow we just assign a row to a room
We are also putting the name of the guest inside the bar.
Now we have a problem. what happens if the size of the reservations is larger than the grid? We will see in the next section - Date Overflow
;