diff --git a/src/changes/changes.xml b/src/changes/changes.xml index b6b325953..2e6037d01 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -49,6 +49,7 @@ Add removeFinalModifier to FieldUtils + uncaught PatternSyntaxException in FastDateFormat on Android Method returns number of inheritance hops between parent and subclass Spelling fixes Misleading Javadoc comment in StrBuilderReader class diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java index c88b63cca..7cea570d6 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java @@ -648,11 +648,12 @@ public class FastDateParser implements DateParser, Serializable { */ @Override boolean addRegex(final FastDateParser parser, final StringBuilder regex) { + // See LANG-954: We use {Nd} rather than {IsNd} because Android does not support the Is prefix if(parser.isNextNumber()) { - regex.append("(\\p{IsNd}{").append(parser.getFieldWidth()).append("}+)"); + regex.append("(\\p{Nd}{").append(parser.getFieldWidth()).append("}+)"); } else { - regex.append("(\\p{IsNd}++)"); + regex.append("(\\p{Nd}++)"); } return true; }