Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1401

StyleDateConverter does not use the components Locale when formatting.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.1
    • 1.3.2
    • wicket-datetime
    • 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;
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            ned.collyer Ned Collyer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: