Details
-
Bug
-
Resolution: Duplicate
-
Low
-
None
-
3.8.1
-
None
-
3.08
-
Description
The problem is with the following parsing method in calendar.jsp:
Date.parseDate = function(str, fmt) { ... var a = str.split(/\W+/); ...
Problem is that \W does not recognize characters such as á, ä, č, ď, é, í, ĺ, ľ, ń, ó, ô, ŕ, ř, š, ť, ú, ý, ž, etc. as valid characters for words and treats them as characters that separate words, hence the date string such as "19/máj/05" (19/May/2005) is split into ["19", "m", "j", "05"].
Under normal circumstances, parsing should result in ["19", "máj", "05"] array, which can be mapped as
parsed | mapped to | |
---|---|---|
19 | 19 | |
máj | 5 | 5th month in the array is _máj |
2005 | 2005 |
However, incorrect parsing continues and causes incorrect mapping:
parsed | mapped to | |
---|---|---|
19 | 19 | |
m | 3 | finds first moth starting with m, which is marec |
j | 2007 | (defaults to year of today's date |
05 | ignored |
As an end result 19/May/2005 pops up in the calendar as 19/Mar/2007.
This was replicated when looking at JRA-8703. Run JIRA with Slovak (Slovakia) as default language (Admin -> General Configuration) or -Duser.language=SK from command line.
I am not sure what is the best way of fixing this.
Attachments
Issue Links
- duplicates
-
JRASERVER-9898 Calendar: incorrect date shown in pop-up when using Russian locale.
- Closed
- relates to
-
JRASERVER-8703 Date picker date format incorrect when server language is not English
- Closed