Add startOfToday and nullability annotations to NSCalendar+RSCore.
This commit is contained in:
parent
8406cb9b8e
commit
1cc532faa1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue