3
This commit is contained in:
@@ -85,13 +85,16 @@
|
||||
NSTimeInterval interval = [[NSDate date] timeIntervalSinceDate:date];
|
||||
|
||||
if (interval < 60) {
|
||||
return @"刚刚";
|
||||
return KBLocalized(@"Just now");
|
||||
} else if (interval < 3600) {
|
||||
return [NSString stringWithFormat:@"%.0f分钟前", interval / 60];
|
||||
return [NSString stringWithFormat:KBLocalized(@"%.0f minutes ago"),
|
||||
interval / 60];
|
||||
} else if (interval < 86400) {
|
||||
return [NSString stringWithFormat:@"%.0f小时前", interval / 3600];
|
||||
return [NSString stringWithFormat:KBLocalized(@"%.0f hours ago"),
|
||||
interval / 3600];
|
||||
} else if (interval < 86400 * 30) {
|
||||
return [NSString stringWithFormat:@"%.0f天前", interval / 86400];
|
||||
return [NSString stringWithFormat:KBLocalized(@"%.0f days ago"),
|
||||
interval / 86400];
|
||||
} else {
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||
formatter.dateFormat = @"MM-dd";
|
||||
|
||||
Reference in New Issue
Block a user