时间问题修复
This commit is contained in:
@@ -27,17 +27,18 @@ public class TimeUtils {
|
||||
} else if (span < TimeConstants.DAY) {
|
||||
return String.format(Locale.getDefault(), "%d小时前", span / TimeConstants.HOUR);
|
||||
} else if (span < TimeConstants.MONTH) {
|
||||
if (span / TimeConstants.DAY >= 7) {
|
||||
SimpleDateFormat sdr = new SimpleDateFormat("MM-dd",
|
||||
Locale.CHINA);
|
||||
return sdr.format(millis);
|
||||
} else {
|
||||
String format = String.format(Locale.getDefault(), "%d天前", span / TimeConstants.DAY);
|
||||
// if (span / TimeConstants.DAY >= 7) {
|
||||
// SimpleDateFormat sdr = new SimpleDateFormat("MM-dd",
|
||||
// Locale.CHINA);
|
||||
// return sdr.format(millis);
|
||||
// } else {
|
||||
//
|
||||
//
|
||||
// }
|
||||
String format = String.format(Locale.getDefault(), "%d天前", span / TimeConstants.DAY);
|
||||
|
||||
Log.e("format",format);
|
||||
return format;
|
||||
|
||||
}
|
||||
Log.e("format",format);
|
||||
return format;
|
||||
} else if (span < TimeConstants.YEAR) {
|
||||
SimpleDateFormat sdr;
|
||||
if (span / TimeConstants.MONTH >= 6) {
|
||||
|
||||
Reference in New Issue
Block a user