Development

#10007 (DateTimePatterns contains wrong pattern for ShortDatePattern)

You must first sign up to be able to contribute.

Ticket #10007 (new defect)

Opened 1 year ago

Last modified 1 year ago

DateTimePatterns contains wrong pattern for ShortDatePattern

Reported by: cdarken Assigned to: fabien
Priority: minor Milestone:
Component: i18n Version: 1.4.x DEV
Keywords: i18n datetime format format_date Cc:
Qualification: Unreviewed

Description

In the comments at the top of the file sfDateTimeFormatInfo.class.php it's stated this:

d ShortDatePattern? MM/dd/yyyy

However, if I print the $data property in the constructor, it contains this:

[DateTimePatterns] => Array
        (
            [0] => HH:mm:ss zzzz
            [1] => HH:mm:ss z
            [2] => HH:mm:ss
            [3] => HH:mm
            [4] => EEEE d MMMM y
            [5] => d MMMM y
            [6] => d MMM y
            [7] => dd/MM/yy
            [8] => {1} {0}
            [9] => {1} {0}
            [10] => {1} {0}
            [11] => {1} {0}
            [12] => {1} {0}
        )

The method getShortDatePattern() returns the value at key 7 which contains obviously "yy" for the year part, instead of "yyyy".

Change History

03/08/12 14:53:29 changed by fabien

  • milestone deleted.

04/10/12 11:51:57 changed by cdarken

If you'll give me a bit of guidance where to look, I could try and fix it.