Zend Framework

Parameters 'w' and 'N' inverted with PHP format in toString function.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.2
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Date
  • Labels:
    None

Description

Hello,

I just noticed a bug: parameters 'w' and 'N' inverted with PHP format in toString function.

Zend_Date::setOptions(array('format_type' => 'php'));
$date = new Zend_Date('2009-09-20','Y-m-d'); // sunday day
echo $date->toString('N', 'php', 'en'); // send 0, should send 7
echo $date->toString('w', 'php', 'en'); // send 7, should send 0

Thomas.

Activity

Hide
Thomas Weidner added a comment -

Fixed in core

Show
Thomas Weidner added a comment - Fixed in core

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: