Loading core/java/android/text/format/DateFormat.java +11 −2 Original line number Diff line number Diff line Loading @@ -242,12 +242,21 @@ public class DateFormat { /** * Returns a {@link java.text.DateFormat} object that can format the time according * to the current locale. * to the current locale and the user's 12-/24-hour clock preference. * @param context the application context * @return the {@link java.text.DateFormat} object that properly formats the time. */ public static final java.text.DateFormat getTimeFormat(Context context) { return java.text.DateFormat.getTimeInstance(java.text.DateFormat.SHORT); boolean b24 = is24HourFormat(context); int res; if (b24) { res = R.string.twenty_four_hour_time_format; } else { res = R.string.twelve_hour_time_format; } return new java.text.SimpleDateFormat(context.getString(res)); } /** Loading core/res/res/values-ar-rEG/donottranslate-cldr.xml +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ <string name="hour_minute_24">%-k:%M</string> <string name="hour_minute_ampm">%-l:%M %p</string> <string name="hour_minute_cap_ampm">%-l:%M %p</string> <string name="twelve_hour_time_format">h:mm a</string> <string name="twenty_four_hour_time_format">H:mm</string> <string name="numeric_date">%-e/%-m/%Y</string> <string name="numeric_date_format">d/M/yyyy</string> <string name="month_day_year">%-e %B، %Y</string> Loading core/res/res/values-bg-rBG/donottranslate-cldr.xml +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ <string name="hour_minute_24">%-k:%M</string> <string name="hour_minute_ampm">%-l:%M %p</string> <string name="hour_minute_cap_ampm">%-l:%M %p</string> <string name="twelve_hour_time_format">h:mm a</string> <string name="twenty_four_hour_time_format">H:mm</string> <string name="numeric_date">%d.%m.%Y</string> <string name="numeric_date_format">dd.MM.yyyy</string> <string name="month_day_year">%d %B %Y</string> Loading core/res/res/values-ca-rES/donottranslate-cldr.xml +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ <string name="hour_minute_24">%-k:%M</string> <string name="hour_minute_ampm">%-l:%M %p</string> <string name="hour_minute_cap_ampm">%-l:%M %^p</string> <string name="twelve_hour_time_format">h:mm a</string> <string name="twenty_four_hour_time_format">H:mm</string> <string name="numeric_date">%d/%m/%Y</string> <string name="numeric_date_format">dd/MM/yyyy</string> <string name="month_day_year">%-e de %B de %Y</string> Loading core/res/res/values-cs-rCZ/donottranslate-cldr.xml +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ <string name="hour_minute_24">%-k:%M</string> <string name="hour_minute_ampm">%-l:%M %p</string> <string name="hour_minute_cap_ampm">%-l:%M %^p</string> <string name="twelve_hour_time_format">h:mm a</string> <string name="twenty_four_hour_time_format">H:mm</string> <string name="numeric_date">%-e.%-m.%Y</string> <string name="numeric_date_format">d.M.yyyy</string> <string name="month_day_year">%-e. %B %Y</string> Loading Loading
core/java/android/text/format/DateFormat.java +11 −2 Original line number Diff line number Diff line Loading @@ -242,12 +242,21 @@ public class DateFormat { /** * Returns a {@link java.text.DateFormat} object that can format the time according * to the current locale. * to the current locale and the user's 12-/24-hour clock preference. * @param context the application context * @return the {@link java.text.DateFormat} object that properly formats the time. */ public static final java.text.DateFormat getTimeFormat(Context context) { return java.text.DateFormat.getTimeInstance(java.text.DateFormat.SHORT); boolean b24 = is24HourFormat(context); int res; if (b24) { res = R.string.twenty_four_hour_time_format; } else { res = R.string.twelve_hour_time_format; } return new java.text.SimpleDateFormat(context.getString(res)); } /** Loading
core/res/res/values-ar-rEG/donottranslate-cldr.xml +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ <string name="hour_minute_24">%-k:%M</string> <string name="hour_minute_ampm">%-l:%M %p</string> <string name="hour_minute_cap_ampm">%-l:%M %p</string> <string name="twelve_hour_time_format">h:mm a</string> <string name="twenty_four_hour_time_format">H:mm</string> <string name="numeric_date">%-e/%-m/%Y</string> <string name="numeric_date_format">d/M/yyyy</string> <string name="month_day_year">%-e %B، %Y</string> Loading
core/res/res/values-bg-rBG/donottranslate-cldr.xml +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ <string name="hour_minute_24">%-k:%M</string> <string name="hour_minute_ampm">%-l:%M %p</string> <string name="hour_minute_cap_ampm">%-l:%M %p</string> <string name="twelve_hour_time_format">h:mm a</string> <string name="twenty_four_hour_time_format">H:mm</string> <string name="numeric_date">%d.%m.%Y</string> <string name="numeric_date_format">dd.MM.yyyy</string> <string name="month_day_year">%d %B %Y</string> Loading
core/res/res/values-ca-rES/donottranslate-cldr.xml +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ <string name="hour_minute_24">%-k:%M</string> <string name="hour_minute_ampm">%-l:%M %p</string> <string name="hour_minute_cap_ampm">%-l:%M %^p</string> <string name="twelve_hour_time_format">h:mm a</string> <string name="twenty_four_hour_time_format">H:mm</string> <string name="numeric_date">%d/%m/%Y</string> <string name="numeric_date_format">dd/MM/yyyy</string> <string name="month_day_year">%-e de %B de %Y</string> Loading
core/res/res/values-cs-rCZ/donottranslate-cldr.xml +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ <string name="hour_minute_24">%-k:%M</string> <string name="hour_minute_ampm">%-l:%M %p</string> <string name="hour_minute_cap_ampm">%-l:%M %^p</string> <string name="twelve_hour_time_format">h:mm a</string> <string name="twenty_four_hour_time_format">H:mm</string> <string name="numeric_date">%-e.%-m.%Y</string> <string name="numeric_date_format">d.M.yyyy</string> <string name="month_day_year">%-e. %B %Y</string> Loading