mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Allow building with the macOS 10.14 SDK
This does mean that NSRelativeDateTimeFormatter is not used, even when running on macOS 10.15.
This commit is contained in:
@@ -56,8 +56,10 @@ static NSUserInterfaceItemIdentifier const kTableColumnIdentifierDescription = @
|
||||
if(NSDate* date = [NSUserDefaults.standardUserDefaults objectForKey:kUserDefaultsLastBundleUpdateCheckKey])
|
||||
{
|
||||
NSString* dateString = [NSDateFormatter localizedStringFromDate:date dateStyle:NSDateFormatterShortStyle timeStyle:NSDateFormatterShortStyle];
|
||||
#if defined(MAC_OS_X_VERSION_10_15) && (MAC_OS_X_VERSION_10_15 <= MAC_OS_X_VERSION_MAX_ALLOWED)
|
||||
if(@available(macos 10.15, *))
|
||||
dateString = -[date timeIntervalSinceNow] < 5 ? @"Just now" : [[[NSRelativeDateTimeFormatter alloc] init] localizedStringForDate:date relativeToDate:NSDate.now];
|
||||
#endif
|
||||
return [NSString stringWithFormat:@"Bundle index last updated: %@", dateString];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user