From 5ad2451f9fcce650b018af4bb3eb3252606d9150 Mon Sep 17 00:00:00 2001 From: howardb Date: Sun, 16 Jun 2013 14:16:53 +0100 Subject: Correct Date format for el_GR, sv_SE and tr_TR locales Amend DateFormat.getDateFormat to CLDR data from icu4c instead of locale specific resource entries which are incorrect for several locales. No CTS tests are added as they require changing the locale which is not currently possible. Bug: https://code.google.com/p/android/issues/detail?id=56385 Change-Id: Ibd11c7fd9b595e19a3e2bf508e1585aa50067e03 Signed-off-by: howardb --- core/java/android/text/format/DateFormat.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) mode change 100644 => 100755 core/java/android/text/format/DateFormat.java (limited to 'core/java/android') diff --git a/core/java/android/text/format/DateFormat.java b/core/java/android/text/format/DateFormat.java old mode 100644 new mode 100755 index ff5106a25c3e..d2b637d9d0db --- a/core/java/android/text/format/DateFormat.java +++ b/core/java/android/text/format/DateFormat.java @@ -246,13 +246,9 @@ public class DateFormat { } } - /* - * The setting is not set; use the default. - * We use a resource string here instead of just DateFormat.SHORT - * so that we get a four-digit year instead a two-digit year. - */ - value = context.getString(R.string.numeric_date_format); - return value; + // The setting is not set; use the locale's default. + LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale); + return d.shortDateFormat4; } /** -- cgit v1.2.3