PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Date and Time » Date » Bug #470

weekOfYear - wrong result

Details

Submitted2003-12-20 23:07 UTC
Fromyyyy at stod dot de
StatusBogus
PackageDate
PHP Version4.3.4
OSwin xp
Roadmaps(Not assigned)

Comments

[2003-12-20 23:07 UTC] yyyy at stod dot de

Description:
------------
"weekOfYear" will produce wrong results.

echo "Heutiges Datum KW: ".$DateTest->weekOfYear($DateTest->dateNow("22,12,2003"));

produces: 51

Regards
Ben

Reproduce code:
---------------
echo "Heutiges Datum KW: ".$DateTest->weekOfYear($DateTest->dateNow("22,12,2003"));

Expected result:
----------------
Result should be: 52 if your week begins on monday.