mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
add +[NSCalendar calendarWithIdentifier:]
This commit is contained in:
parent
5c7713cacc
commit
c5fac90b86
3 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2018-04-30 Graham Lee <graham@iamleeg.com>
|
||||
|
||||
* Source/NSCalendar.m (calendarWithIdentifier:):
|
||||
New convenience method implemented by Cocoa.
|
||||
|
||||
2018-04-24 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure: regenerate
|
||||
|
|
|
@ -259,6 +259,7 @@ enum
|
|||
}
|
||||
|
||||
+ (id) currentCalendar;
|
||||
+ (id) calendarWithIdentifier: (NSString *) string;
|
||||
|
||||
- (id) initWithCalendarIdentifier: (NSString *) string;
|
||||
- (NSString *) calendarIdentifier;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue