add +[NSCalendar calendarWithIdentifier:]

This commit is contained in:
Graham Lee 2018-04-30 18:01:51 +01:00
parent 5c7713cacc
commit c5fac90b86
3 changed files with 11 additions and 0 deletions

View file

@ -252,6 +252,11 @@ static NSRecursiveLock *classLock = nil;
return self;
}
+ (id) calendarWithIdentifier: (NSString *) string
{
return [[[self alloc] initWithCalendarIdentifier: string] autorelease];
}
- (id) initWithCalendarIdentifier: (NSString *) string
{
NSAssert(0 == _NSCalendarInternal, NSInvalidArgumentException);