Wicket
  1. Wicket
  2. WICKET-1401

StyleDateConverter does not use the components Locale when formatting.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.3.2
    • Component/s: wicket-datetime
    • Labels:
      None

      Description

      The StyleDateConverter class does not use .withLocale(getLocale()) in the getFormat() method.

      This means that any "LL" formatted dates do not have the correct translations present when outputting words (eg, month).

      protected DateTimeFormatter getFormat() {
      DateTimeFormatter dtf = DateTimeFormat.forPattern(getDatePattern()).withPivotYear(2000);
      return dtf;
      }

      should be

      protected DateTimeFormatter getFormat() {
      DateTimeFormatter dtf = DateTimeFormat.forPattern(getDatePattern()).withLocale(getLocale()).withPivotYear(2000);
      return dtf;
      }

        Activity

        Ned Collyer created issue -
        Gerolf Seitz made changes -
        Field Original Value New Value
        Assignee Gerolf Seitz [ seitz ]
        Fix Version/s 1.3.2 [ 12312942 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Igor Vaynberg made changes -
        Assignee Gerolf Seitz [ seitz ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Ned Collyer
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development