centurion-project/Centurion — Issue #15: Problem in Centurion_Locale_Format
Author: DiaFR
Created: 2012-01-19 15:44:57+00:00
State: open

bug example
with Centurion_Locale_Format::convertDatepickerToIsoFormat(), dd/MM/yy becomes dd/MMMMMMMMMMMMMMM/yyyyyyyy instead of dd/MMMM/yyyy

bug explanation
after arsort, Centurion_Locale_Format::$formatIsoToDatepicker looks like this:
array
'yy' => string 'yyyy' (length=4)
'y' => string 'yy' (length=2)
'dd' => string 'dd' (length=2)
'd' => string 'd' (length=1)
'@' => string 'U' (length=1)
'MM' => string 'MMMMM' (length=5)
'M' => string 'MMM' (length=3)
'mm' => string 'MM' (length=2)
'm' => string 'M' (length=1)
'DD' => string 'EEEE' (length=4)
'D' => string 'EEE' (length=3)
'oo' => string 'DD' (length=2)
'o' => string 'D' (length=1)
so "yy" are replaced by "yyyy" and then "y" are replaced by "yy", by str_replace, same problem for "M"

these lines should be removed as they are useless:
'yy' => string 'yyyy' (length=4)
'dd' => string 'dd' (length=2)
'd' => string 'd' (length=1)

I do not have solution right now for "M"
or you might not use str_replace