How to get the difference between two dates with 360 days/year, 30 days/month format?
<p>I can get the difference between two dates (DD/MM/YY format) with the following code;</p>

<pre><code>$date1   = new DateTime("1986-04-27");
$today  = new DateTime("now");
$interval   = $date1-&gt;diff($today);
$year       = $interval-&gt;format('%y');
$month      = $interval-&gt;format('%m');
$day        = $interval-&gt;format('%d');
</code></pre>

<p>It works perfect when calculating 1 year 2 months but when I'm trying to calculate 1 year 2 months 3 days, it doesn't give me the accurate result.</p>

<p>I would like to get the difference between two dates, using 360 days for a year, 30 days for a month, without calculating leap years..</p>

<p>For example; if a month has 31 days the system will calculate it as 30 days.
If a year has 365 days, the system will calculate it as 1 year 5 days. (360 + 5)</p>

<p>How can I do that?</p>

<p>Thank you.. </p>