MCPcopy Create free account
hub / github.com/M66B/FairEmail / getTimePattern

Method getTimePattern

app/src/main/java/eu/faircode/email/Helper.java:2456–2463  ·  view source on GitHub ↗
(Context context, int style)

Source from the content-addressed store, hash-verified

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);

Callers 3

getTimeInstanceMethod · 0.95
getDateTimeInstanceMethod · 0.95
attachEnvironmentMethod · 0.95

Calls 1

getDefaultMethod · 0.80

Tested by

no test coverage detected