title: Prolog : Comparing a range of times
body: <p>Quick rundown, basically, the idea of the prolog program (GNU Prolog) is to search a database containing people with available time slots to a set of times (beginning time, end time) and return the first person who can meet in that time. The input has the syntax</p>
  
  <pre><code>meeting(Person,slot(time(10,0),time(12,30)))
  </code></pre>
  
  <p>I have a predicate which matches the above as such:</p>
  
  <pre><code>meeting(Person, slot(time(A,B),time(C,D))) :- %insert code
  </code></pre>
  
  <p>and the database entries look as such:</p>
  
  <pre><code>free(george,slot(time(9,30),time(11,0)))
  </code></pre>
  
  <p>Where I am stuck is that I'm not sure how I can compare the times in the database with the times entered when calling my meeting predicate. Not looking for a free answer, just wanting a push in the right direction and a good example :) Thanks everyone!</p>