mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-02 21:24:34 +00:00
This year
This commit is contained in:
parent
904d6e82f3
commit
82e039f3fe
1 changed files with 2 additions and 1 deletions
|
@ -2005,7 +2005,8 @@ public class Helper {
|
|||
Calendar cal1 = Calendar.getInstance();
|
||||
cal0.setTimeInMillis(millis);
|
||||
boolean thisMonth = (cal0.get(Calendar.MONTH) == cal1.get(Calendar.MONTH));
|
||||
String skeleton = (thisMonth ? "MMM-d" : "Y-M-d");
|
||||
boolean thisYear = (cal0.get(Calendar.YEAR) == cal1.get(Calendar.YEAR));
|
||||
String skeleton = (thisMonth && thisYear ? "MMM-d" : "Y-M-d");
|
||||
String format = android.text.format.DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);
|
||||
return new SimpleDateFormat(format).format(millis);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue