title: Clips: calculating age
body: <p>I need a function for calculate age. I've just started to study <em>CLIPS</em>. I can calculate years but the answer is wrong.</p>
  
  <pre><code>(defrule calc-age
  (person (date-of-birth ?dob))
  =&gt;
      (bind ?age (- 2017 ?dob))
  (printout t ?age))
  </code></pre>