title: Get Year From Date string
body: <p>I want to check whether the current year is greater than a date string(D-M-Y)  here is my code</p>
  
  <pre><code>$OldDate = "09-30-2011";
  $OldYear = strtok($OldDate, '-');
  $NewYear = date("Y");
  
  if ($OldYear &lt; $NewYear) {
      echo "Year is less than current year"   
  } else {
      echo "Year is greater than current year";
  }
  </code></pre>