summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-06-17 13:12:41 -0700
committerElliott Hughes <enh@google.com>2013-06-17 13:12:41 -0700
commit2f5b39ddcdfc4ab7edd0a5a02801eb3dc96e0266 (patch)
tree511f13e15d329b3495bcb2aec3176e20e26d0906 /luni
parentcf353b74ba45a796fdc0d0e334dc40968d57066e (diff)
downloadlibcore-2f5b39ddcdfc4ab7edd0a5a02801eb3dc96e0266.zip
libcore-2f5b39ddcdfc4ab7edd0a5a02801eb3dc96e0266.tar.gz
libcore-2f5b39ddcdfc4ab7edd0a5a02801eb3dc96e0266.tar.bz2
Add a short date format that's guaranteed to have 4-digit years.
Bug: https://code.google.com/p/android/issues/detail?id=56385 Change-Id: Ie60d8c61aae09358d296654bd30378cbd11eeecb
Diffstat (limited to 'luni')
-rw-r--r--luni/src/main/java/libcore/icu/LocaleData.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/luni/src/main/java/libcore/icu/LocaleData.java b/luni/src/main/java/libcore/icu/LocaleData.java
index 7a8607b..a6d700f 100644
--- a/luni/src/main/java/libcore/icu/LocaleData.java
+++ b/luni/src/main/java/libcore/icu/LocaleData.java
@@ -79,6 +79,10 @@ public final class LocaleData {
public String mediumDateFormat;
public String shortDateFormat;
+ // shortDateFormat, but guaranteed to have 4-digit years.
+ // Used by android.text.format.DateFormat.getDateFormatStringForSetting.
+ public String shortDateFormat4;
+
// Used by android.text.format.DateFormat.getTimeFormat.
public String timeFormat12; // "hh:mm a"
public String timeFormat24; // "HH:mm"
@@ -187,6 +191,7 @@ public final class LocaleData {
// accidentally eat too much.
localeData.integerPattern = localeData.numberPattern.replaceAll("\\.[#,]*", "");
}
+ localeData.shortDateFormat4 = localeData.shortDateFormat.replaceAll("\\byy\\b", "y");
return localeData;
}
}