title: Date Interval can return negative zero or positive zero how can I set a conditional statement on the result
body: <p>Given the <a href="http://php.net/manual/en/datetime.diff.php" rel="nofollow">$interval</a> is a <a href="http://php.net/dateinterval" rel="nofollow">DateInterval</a> object following conditional statement is true whether the anniversary is within 1 year prior to the current date = 0 or the anniversary is within 1 year post the current date = -0.        </p>
  
  <pre><code>$interval = $anniversary-&gt;diff($current_Date);
  if ($interval-&gt;format('%r%y') &lt; 0){
      do something
  }
  </code></pre>
  
  <ul>
  <li>I can't use abs because they are both 0</li>
  <li>I can't use &lt;= 0 because they both are</li>
  <li>I can't use >= 0 because this sets to true on other cases which I don't want</li>
  <li>I can't use &lt; 0 because 0 isn't and I want 0 to be true</li>
  <li>I can't use == 0 because both are true</li>
  <li>I can't use > 0 because 0 isn't and I want 0 to be true</li>
  </ul>
  
  <p>So I want to be able to say something like is this number signed negative but no such thing exists as far as I can tell. Any thoughts?</p>
  
  <p>** Edit **</p>
  
  <p>The solution is to compare the date objects and decide if they are in the appropriate DateInterval:</p>
  
  <pre><code>if ($anniversary &lt; $current_Date &amp;&amp; $interval-&gt;format('%r%y') == 0){
  </code></pre>