PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Date and Time » Date » Bug #2172

Inconsistent start of week in package

Details

Submitted2004-08-20 09:19 UTC
Fromandrew at awarez dot net
Assignedpajoye
StatusBogus
PackageDate
PHP Version4.3.6
OSFedora Core 1
Roadmaps(Not assigned)

Comments

[2004-08-20 09:19 UTC] andrew at awarez dot net

Description:
------------
By default, the Date package has an inconsistent start of week value. That is, by default, the Date::getDayOfWeek() method uses Sunday (0) as the first day of the week, while Date_Calc::beginOfWeek() uses Monday (1) as the first day of the week. It would be nice to be able to have consitent results from both classes in the package without having to modify anything.

[2004-08-29 11:10 UTC] pierre at dotgeek dot org

The id of a week day is always the same, starting at 0 (sunday). Regardless to the first day of the week.

The first day of the week is defined using the defined constant (default is monday, id #1).

You are confusing between day of the week number and the 1st day of the week (which could be monday id #1 or sunday id #0),

--Pierre

[2004-08-29 11:10 UTC] pierre at dotgeek dot org

Sorry, but your problem does not imply a bug in PEAR itself. For a
list of more appropriate places to ask for help using PEAR, please
visit http://pear.php.net/support/ as this bug system is not the
appropriate forum for asking support questions.

Thank you for your interest in PEAR.

> bogus