Issues

Issue #68 resolved

New Japanese date format since Yii 1.11

Hisateru Tanaka
created an issue

I can't display a screen that contains calendar. Please change

/app/protected/extensions/zurmoinc/framework/adapters/YiiToJqueryUIDatePickerLocalization.php

to

                case 'yy/MM/dd':    //ja format
                case 'yyyy/MM/dd':  //new ja format of Yii 1.11
                    return 'y/mm/dd';

Some i18n data was updated since Yii 1.11. Japanese short date format had been changed from 'yy/MM/dd' to 'yyyy/MM/dd'. This format is found also at some other locales.

https://github.com/yiisoft/yii/blob/master/framework/i18n/data/ja.php#L166

It was automatically updated by newest CLDR data and I couldn't keep legacy compatibility. http://cldr.unicode.org/index/downloads

Comments (14)

  1. Hisateru Tanaka reporter

    Yes, we have used both format ever. Currently "yyyy" is adopted by CLDR as more usual case than older "yy" style, but it's better to support both format for safety.

  2. Hisateru Tanaka reporter

    This issue still not fixed. My modification of date was ignored in Japanese environment.

    I got an expected result when changing app/protected/core/adapters/YiiToJqueryUIDatePickerLocalization.php as:

                         return 'y-m-dd';
                     case 'yy/MM/dd':    //ja format
                     case 'yyyy/MM/dd':  //new ja format of Yii 1.11
                         // older buggy format: return 'y/mm/dd';
                         return 'yy/mm/dd';
                     case 'dd-MM-yy':    //nl format
                             return 'dd-mm-y';
                     case 'd/MM/yy':     //en_au format
    

    Please commit this change to default branch. I will merge it into my local branch with Japanese and test it again.

    Can I close this issue if the test was succeeded?

  3. Hisateru Tanaka reporter

    I checked but it still not.

    Please change jQuery UI's date format to "yy/mm/dd" from "y/mm/dd". Currently it is "y/mm/dd" that is not match to Yii formated date string.

    For example Yii can accept "2013/02/12" but the calendar UI shows "13/02/12".

                    case 'yy/MM/dd':    //ja format
                    case 'yyyy/MM/dd':  //new ja format of Yii 1.11
                        return 'yy/mm/dd';  // <======= This line
    
  4. Log in to comment