ZF-5615: ZendX_JQuery_View_Helper_DatePicker - error during date convertion
Description
Hi everyone. I've just found a bug in the ZendX_JQuery_View_Helper_DatePicker class in _resolveLocaleToDatePickerFormat() function. I set up zend_locale to en, so first part the result of Zend_Locale_Format::getDateFormat() method is MMM, which is equivalent to M in date() function. The _resolveLocaleToDatePickerFormat() function makes it as 'mmm' not 'M'. The problem is in str_replace() function, because shorter strings are at the beginning of array map, so str_replace() repleaced 3 times 'M' by 'm'.
Hope you know what I mean.
Comments
Posted by Benjamin Eberlei (beberlei) on 2009-01-22T11:31:24.000+0000
can you give me the complete Zend_Locale format and the expected Javascript result? I have fixed it here, though i don't know if its correct.
Posted by Jakub Igla (qba_rox) on 2009-01-23T01:10:27.000+0000
Oyy! My Zend_Locale format is: 'MMM d, yyyy' and after the replacement I suppose to get 'M d, yy'.
Posted by Benjamin Eberlei (beberlei) on 2009-02-03T10:45:01.000+0000
Will be fixed in next mini or minor release