(Context context, int style)
| 2454 | } |
| 2455 | |
| 2456 | static String getTimePattern(Context context, int style) { |
| 2457 | // https://issuetracker.google.com/issues/37054851 |
| 2458 | boolean is24Hour = android.text.format.DateFormat.is24HourFormat(context); |
| 2459 | String skeleton = (is24Hour ? "Hm" : "hm"); |
| 2460 | if (style == SimpleDateFormat.MEDIUM) |
| 2461 | skeleton += "s"; |
| 2462 | return android.text.format.DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton); |
| 2463 | } |
| 2464 | |
| 2465 | static CharSequence getRelativeDateSpanString(Context context, long millis) { |
| 2466 | return getRelativeTimeSpanString(context, millis, false, true, false); |
no test coverage detected