title: Php fiscal year report, trouble with selecting proper year
body: <p>I am building a report for a client using php and codeigniter.</p>
  
  <p>This report is a financial report, as such, I must reflect money collected since the beginning of the fiscal year. In this case, July 31st.</p>
  
  <p>I already query the user for the date of the report, but how would I get php to know which fiscal year to take?</p>
  
  <p>I have a rough idea, something along the lines of </p>
  
  <p>'If Month-Day is before July 31, use current year-1
  Else use current year'</p>
  
  <p>But I do not know how I would code that, or if it would work, or if there is a more elegant way of doing the same thing.</p>