original_string: 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;
      }
    }
code: 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;
      }
    }
code_tokens: 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 ; } }
docstring: Compares two dates
  
  @param [String|Object] $date the string of the date to compare or an object of this class
  @param [String] $comparator allowed comparators '>','>=', '<','<=', '='
  @return Boolean
docstring_tokens: Compares two dates