Opened 8 years ago

Closed 4 years ago

#15007 closed defect (patchwelcome)

full date format patterns and regex don't match when in comes to space characters in days of the

Reported by: rlintern Owned by: Adam Peller
Priority: undecided Milestone: 1.13
Component: Internationalization Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by ben hockey)

To reproduce:

  1. Create a DateTextBox? with a lang="he" (default to Gregorian calendar)
  2. Set its constraints formatLength to "full"
  3. Set its value to the current date (or pick a date from the dropdown calendar)
  4. You will get a warning that the date is not valid

I believe this is because the Hebrew days of the week have spaces in them which doesn't match completely with the mapping between the 'E' date formatting character and the regular expression in locale.js's _buildDateTimeRE function which only allows \S+

Change History (5)

comment:1 Changed 8 years ago by ben hockey

Description: modified (diff)

comment:2 Changed 8 years ago by Adam Peller

Status: newassigned

easiest workaround I can think of for this would be to substitute some other whitespace character within day of the week which doesn't match the regexp

comment:3 Changed 8 years ago by rlintern

I can't find such "non-whitespace space" character and I would consider it a possible a bug in the browser if it didn't match with \s. I've tried a few; I looked at the Unicode characters (http://unicode.org/charts/PDF/U0000.pdf) and these docs https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp#ref_equivalent_s

For now I'm just avoiding 'full' date formatting and Hebrew. Other locales have the same issue (for example 'ga') but these are not locales we support in our product.

comment:4 Changed 7 years ago by rlintern

FYI, Catalan has the same problem.

comment:5 Changed 4 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 3+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.