mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-27 10:40:50 +00:00
Added -isEqual: to NSCalendar.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31965 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6e39836d18
commit
b1ce49ff43
3 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-01-27 Stefan Bidigaray <stefanbidi@gmail.com>
|
||||
|
||||
* Source/NSCalendar.m: Add -isEqual:.
|
||||
|
||||
2011-01-27 Stefan Bidigaray <stefanbidi@gmail.com>
|
||||
|
||||
* Source/NSCalendar.m: Open UCalendar before use.
|
||||
|
|
|
@ -70,6 +70,7 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit)
|
|||
|
||||
@interface NSCalendar (PrivateMethods)
|
||||
- (void) _resetCalendar;
|
||||
- (void *) _UCalendar;
|
||||
- (NSString *) _localeIdWithLocale: (NSLocale *) locale;
|
||||
- (NSString *)_localeIdentifier;
|
||||
- (void) _setLocaleIdentifier: (NSString *) identifier;
|
||||
|
@ -109,6 +110,11 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit)
|
|||
#endif
|
||||
}
|
||||
|
||||
- (void *) _UCalendar
|
||||
{
|
||||
return _cal;
|
||||
}
|
||||
|
||||
- (NSString *) _localeIdWithLocale: (NSLocale *) locale
|
||||
{
|
||||
NSString *result;
|
||||
|
@ -524,6 +530,9 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit)
|
|||
|
||||
- (BOOL) isEqual: (id) obj
|
||||
{
|
||||
#if GS_USE_ICU == 1
|
||||
return (BOOL)ucal_equivalentTo (_cal, [obj _UCalendar]);
|
||||
#else
|
||||
if ([obj isKindOfClass: [self class]])
|
||||
{
|
||||
if (![_identifier isEqual: [obj calendarIdentifier]])
|
||||
|
@ -536,6 +545,7 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit)
|
|||
}
|
||||
|
||||
return NO;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder*)encoder
|
||||
|
|
|
@ -1160,7 +1160,7 @@ static NSUInteger _defaultBehavior = 0;
|
|||
|
||||
- (BOOL) generatesDecimalNubmers
|
||||
{
|
||||
return _genDecimal;
|
||||
return NO; // FIXME
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue