Login   Register  
PHP Classes
elePHPant
Icontem

subtract Month

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Date and Time Calculator  >  All threads  >  subtract Month  >  (Un) Subscribe thread alerts  
Subject:subtract Month
Summary:calculate wrong month when you subtract more than 12 months
Messages:2
Author:Marc Ostroznik
Date:2008-06-25 07:26:25
Update:2008-06-25 17:10:08
 

  1. subtract Month   Reply  
Picture of Marc Ostroznik
Marc Ostroznik
2008-06-25 07:26:26
hi elac,
in the month substract are a mistake:
you have in line 424

$numofmonths = $monpos % 12;
the variable $monpos are not set in you class
correct are this
$numofmonths = $this->month % 12;

very nice class.

Best regards,

Marc

  2. Re: subtract Month   Reply  
Picture of Cale O
Cale O
2008-06-25 17:10:08 - In reply to message 1 from Marc Ostroznik
Thanks for noticing that and telling me. It's fixed now. I had to change that whole month subtraction section so you might want to download the newest version (0.9.3).