PHP Classes

It seems BOM() has a bug.

Recommend this page to a friend!

      Date Class  >  All threads  >  It seems BOM() has a bug.  >  (Un) Subscribe thread alerts  
Subject:It seems BOM() has a bug.
Summary:Package rating comment
Messages:1
Author:Angelo Mondati
Date:2012-02-22 09:04:18
 

Angelo Mondati rated this package as follows:

Utility: Good
Consistency: Good
Documentation: Sufficient

  1. It seems BOM() has a bug.   Reply   Report abuse  
Picture of Angelo Mondati Angelo Mondati - 2012-02-22 09:04:18
It seems BOM() has a bug.

It should be

$dt->Add("day",-1*($dt->Day()-1));

instead of

$dt->Add("day",-1*($dt->Day()));

otherwise the first day of the month is wrong and return the last day of the previous month. Also BOM() is used inside other functions (EOM()) and its bug affects them.