Issue Type: Improvement Created: 2008-12-14T23:45:32.000+0000 Last Updated: 2008-12-21T05:03:26.000+0000 Status: Resolved Fix version(s): - 1.7.2 (23/Dec/08)
Reporter: Liber Chen (liber) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date
Related issues: Attachments:
Zend_Date to array or display the Weekday, always consider the Sunday is '0', but setweekday() consider Sunday is '7'.
would that can be the same rule ?
Posted by Liber Chen (liber) on 2008-12-14T23:48:54.000+0000
I mean the setWeekDay follows the ISO standard, so sunday is '7'. But if use toArray() of Zend_Date, the weekday will be '0' as the GNU standard.
I suggest that use one rule for Zend_Date, not two different kind of rule. It will make people confused.
Posted by Thomas Weidner (thomas) on 2008-12-15T00:41:09.000+0000
Why would this be a problem when both rules are supported ?
Posted by Liber Chen (liber) on 2008-12-15T00:58:20.000+0000
It is not consistent.
Please consider below situation:
$b = $a->toArray(); $weekDay = $b['weekday'];
echo $weekDay (It is 0, not 7)
But if it is consistent. Then we can define a constant to check it.
define('SUNDAY', 0); ( Or 7 if ISO standard)
$a->setWeekDay(SUNDAY); $b = $a->toArray(); $weekDay = $b['weekday'];
echo $weekDay==SUNDAY (This will be true, because it is consistent)
Posted by Thomas Weidner (thomas) on 2008-12-15T03:56:36.000+0000
Integrated with r13258
Have you found an issue?
See the Overview section for more details.