calculate fiscal year issue
<p>I am trying to calculate the fiscal year from this following code. But I am getting year 13 instead of 12. What could be wrong? Please suggest.</p>

<pre><code>calculateFiscalYearForDate(date("m/d/y"), "10/1", "9/30");

function calculateFiscalYearForDate($inputDate, $fyStart, $fyEnd)
    {
        $date = strtotime($inputDate);
        $inputyear = strftime('%y',$date);

        $fystartdate = strtotime($fyStart.$inputyear);
        $fyenddate = strtotime($fyEnd.$inputyear);

        if($date &lt; $fyenddate){
            $fy = intval($inputyear);
        }else{
            $fy = intval(intval($inputyear) + 1);
        }
        return $fy;
    }
</code></pre>
