mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 16:16:33 +02:00
Show rule relative time in list
This commit is contained in:
@@ -2307,6 +2307,15 @@ public class Helper {
|
||||
return DateUtils.getRelativeTimeSpanString(context, millis);
|
||||
}
|
||||
|
||||
static String formatHour(Context context, int minutes) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.set(Calendar.HOUR_OF_DAY, minutes / 60);
|
||||
cal.set(Calendar.MINUTE, minutes % 60);
|
||||
cal.set(Calendar.SECOND, 0);
|
||||
cal.set(Calendar.MILLISECOND, 0);
|
||||
return Helper.getTimeInstance(context, SimpleDateFormat.SHORT).format(cal.getTime());
|
||||
}
|
||||
|
||||
static String formatDuration(long ms) {
|
||||
return formatDuration(ms, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user