public function compare($date, $comparator)
  {
    //check if the argument $date is an instance of this class
    if ( $date instanceof $this){
      $tmp = $date;
    }
    else {
      $tmp = new \bbn\time($date);
    }
    switch ( $comparator ){
      case $comparator === '>':  
        return $this->get_time() > $tmp->get_time(); 
        break;
      case $comparator === '>=':  
        return $this->get_time() >= $tmp->get_time(); 
        break;
      case $comparator === '<':  
        return $this->get_time() < $tmp->get_time(); 
        break;
      case $comparator === '<=':  
        return $this->get_time() <= $tmp->get_time(); 
        break;
      case $comparator === '=':  
        return $this->get_time() == $tmp->get_time(); 
        break;
    }
  }