Issues

ZF-5786: Date format conversion from application wide Zend_Locale to javascript format is not correct

Issue Type: Bug Created: 2009-02-14T12:09:33.000+0000 Last Updated: 2009-02-14T12:22:59.000+0000 Status: Closed Fix version(s): Reporter: sebastien crocquesel (cortex) Assignee: Benjamin Eberlei (beberlei) Tags: - ZendX_JQuery

Related issues: - ZF-5615

Attachments:

Description

In the ZendX_JQuery_View_Helper_DatePicker::_resolveLocaleToDatePickerFormat, the replacement of MMM to M is then override by the replacement of M to m. Thus, a locale with a date format "d MMM yyyy" will produce a date format "d m yy" instead of "d M yy".

Also, order of replacement must begin with larger pattern first : "MMMM" was replaced as it is "M" 4 times.

I have fix this with a quick dirty trick:

$dateFormat = str_replace( array('EEE', 'EEEE', 'MMMM', 'MMM', 'MM', 'M', 'YYYY', 'YY', 'yyyy', '$', '£'), array('D', 'DD', '$$', '$', 'mm', 'm', '££', '£, 'yy', 'M', 'y'), Zend_Locale_Format::getDateFormat($locale) );

Comments

Posted by Benjamin Eberlei (beberlei) on 2009-02-14T12:22:36.000+0000

duplicate, this bug is fixed in 1.7.5

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts