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

StyleDateConverter does not use the components Locale when formatting.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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;
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: