mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 01:40:22 +00:00
Add startOfToday and nullability annotations to NSCalendar+RSCore.
This commit is contained in:
1 parent
8406cb9b8e
commit
1cc532faa1
2 files changed
+11
No files matched your search
@@ -8,9 +8,15 @@
|
||||
|
||||
@import Foundation;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NSCalendar (RSCore)
|
||||
|
||||
+ (NSCalendar *)rs_cachedCalendar;
|
||||
+ (BOOL)rs_dateIsToday:(NSDate *)d;
|
||||
+ (NSDate *)rs_startOfToday NS_SWIFT_NAME(startOfToday());
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -73,4 +73,9 @@ static NSCalendar *cachedCalendar = nil;
|
||||
}
|
||||
|
||||
|
||||
+ (NSDate *)rs_startOfToday {
|
||||
|
||||
return [[self rs_cachedCalendar] startOfDayForDate:[NSDate date]];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user