Re: PEAR::Date docs?
| From: | Justin Hendrickson | Date: | Tue, 22 Jul 2003 13:56:55 +0000 |
| Subject: | Re: PEAR::Date docs? | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-6715@lists.php.net to get a copy of this message | ||
For those of you considering/planning to use PEAR::Date and rely on a PHPDocumentor dump for your
reference, be warned: it'll miss line 6 of Calc.php, define (
'DATE_CALC_BEGIN_WEEKDAY' , 1 );
This define tells the class to use Monday (international standard) or Sunday (US standard) as the
first day of the week and thus, return unexpected results to all resulting calculations.
Additionally, the define isn't set to check if that constant isn't already defined, so
it'll throw a notice error (for those of you extremely picky coders like myself). Last I check,
in the CVS, it's been fixed, but a new version hasn't been published yet, you can either:
1) live with the notice error until a new version is published; or 2) add in a quick if conditional
to check if the constant is defined (this is how the CVS is setup) [if ( ! defined (
'DATE_CALC_BEGIN_WEEKDAY' ) ) define ( 'DATE_CALC_BEGIN_WEEKDAY , 1 );
Anyway, hopefully this will be useful to someone and save them from the headach of debugging that I
experienced.