Tapestry 5
  1. Tapestry 5
  2. TAP5-224

DateField shows day abbreviation labels in wrong order for some non-english locales

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.15
    • Fix Version/s: 5.0.16
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Note: This affects only labels, everything else is ok.

      It seems that DateField wants to always show Sunday as the starting day, it should be determined as instructed in:

      http://java.sun.com/javase/6/docs/api/java/util/Calendar.html#getFirstDayOfWeek()

      This bug can be seen with Locale France or Finnish (Where Monday starts the week.).

      Currently datefield is coded like this, but it should take into account that sunday may or may not be the first day of week. (Line 257.)

      String[] weekdays = symbols.getWeekdays();

      for (int i = Calendar.SUNDAY; i <= Calendar.SATURDAY; i++)

      { days.append(weekdays[i].substring(0, 1)); }

      spec.put("days", days.toString().toLowerCase(locale));

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Ville Virtanen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development