Login   Register  
PHP Classes
elePHPant
Icontem

It seems BOM() has a bug.

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

      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  
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.