LANG-826 FastDateParser does not handle non-ASCII digits correctly
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bb8164bb2c
commit
62d5c0eecb
|
@ -22,6 +22,7 @@
|
|||
<body>
|
||||
|
||||
<release version="3.2" date="TBA" description="Next release">
|
||||
<action issue="LANG-826" type="fix">FastDateParser does not handle non-ASCII digits correctly</action>
|
||||
<action issue="LANG-825" type="add">Create StrBuilder APIs similar to String.format(String, Object...)</action>
|
||||
<action issue="LANG-817" type="fix">Add org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS_8</action>
|
||||
<action issue="LANG-813" type="fix">StringUtils.equalsIgnoreCase doesn't check string reference equality</action>
|
||||
|
|
|
@ -684,10 +684,10 @@ public class FastDateParser implements DateParser, Serializable {
|
|||
@Override
|
||||
public boolean addRegex(FastDateParser parser, StringBuilder regex) {
|
||||
if(parser.isNextNumber()) {
|
||||
regex.append("(\\d{").append(parser.getFieldWidth()).append("}+)");
|
||||
regex.append("(\\p{IsNd}{").append(parser.getFieldWidth()).append("}+)");
|
||||
}
|
||||
else {
|
||||
regex.append("(\\d++)");
|
||||
regex.append("(\\p{IsNd}++)");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue