Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ad2451f authored by howardb's avatar howardb Committed by Elliott Hughes
Browse files

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: default avatarhowardb <android@howardb.com>
parent 618ed234
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -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;
    }

    /**
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
    <string name="hour_minute_ampm">%-l:%M %p</string>
    <string name="hour_minute_cap_ampm">%-l:%M %^p</string>
    <string name="numeric_date">%Y/%m/%d</string>
    <string name="numeric_date_format">yyyy/MM/dd</string>
    <string name="numeric_date_template">"%s/%s/%s"</string>
    <string name="month_day_year">%d %B %Y</string>
    <string name="time_of_day">%-l:%M:%S %p</string>
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
    <string name="hour_minute_ampm">%-l:%M %p</string>
    <string name="hour_minute_cap_ampm">%-l:%M %p</string>
    <string name="numeric_date">%d/%m/%Y</string>
    <string name="numeric_date_format">dd/MM/yyyy</string>
    <string name="numeric_date_template">"%s/%s/%s"</string>
    <string name="month_day_year">%d %B %Y</string>
    <string name="time_of_day">%-l:%M:%S %p</string>
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
    <string name="hour_minute_ampm">%-l:%M %p</string>
    <string name="hour_minute_cap_ampm">%-l:%M %p</string>
    <string name="numeric_date">%-e/%-m/%Y</string>
    <string name="numeric_date_format">d/M/yyyy</string>
    <string name="numeric_date_template">"%s/%s/%s"</string>
    <string name="month_day_year">%-e %B، %Y</string>
    <string name="time_of_day">%-l:%M:%S %p</string>
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
    <string name="hour_minute_ampm">%-l:%M %p</string>
    <string name="hour_minute_cap_ampm">%-l:%M %p</string>
    <string name="numeric_date">%-e/%-m/%Y</string>
    <string name="numeric_date_format">d/M/yyyy</string>
    <string name="numeric_date_template">"%s/%s/%s"</string>
    <string name="month_day_year">%-e %B، %Y</string>
    <string name="time_of_day">%-l:%M:%S %p</string>
Loading