mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-28 11:10:51 +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>
|
2011-01-27 Stefan Bidigaray <stefanbidi@gmail.com>
|
||||||
|
|
||||||
* Source/NSCalendar.m: Open UCalendar before use.
|
* Source/NSCalendar.m: Open UCalendar before use.
|
||||||
|
|
|
@ -70,6 +70,7 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit)
|
||||||
|
|
||||||
@interface NSCalendar (PrivateMethods)
|
@interface NSCalendar (PrivateMethods)
|
||||||
- (void) _resetCalendar;
|
- (void) _resetCalendar;
|
||||||
|
- (void *) _UCalendar;
|
||||||
- (NSString *) _localeIdWithLocale: (NSLocale *) locale;
|
- (NSString *) _localeIdWithLocale: (NSLocale *) locale;
|
||||||
- (NSString *)_localeIdentifier;
|
- (NSString *)_localeIdentifier;
|
||||||
- (void) _setLocaleIdentifier: (NSString *) identifier;
|
- (void) _setLocaleIdentifier: (NSString *) identifier;
|
||||||
|
@ -109,6 +110,11 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void *) _UCalendar
|
||||||
|
{
|
||||||
|
return _cal;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *) _localeIdWithLocale: (NSLocale *) locale
|
- (NSString *) _localeIdWithLocale: (NSLocale *) locale
|
||||||
{
|
{
|
||||||
NSString *result;
|
NSString *result;
|
||||||
|
@ -524,6 +530,9 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit)
|
||||||
|
|
||||||
- (BOOL) isEqual: (id) obj
|
- (BOOL) isEqual: (id) obj
|
||||||
{
|
{
|
||||||
|
#if GS_USE_ICU == 1
|
||||||
|
return (BOOL)ucal_equivalentTo (_cal, [obj _UCalendar]);
|
||||||
|
#else
|
||||||
if ([obj isKindOfClass: [self class]])
|
if ([obj isKindOfClass: [self class]])
|
||||||
{
|
{
|
||||||
if (![_identifier isEqual: [obj calendarIdentifier]])
|
if (![_identifier isEqual: [obj calendarIdentifier]])
|
||||||
|
@ -536,6 +545,7 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit)
|
||||||
}
|
}
|
||||||
|
|
||||||
return NO;
|
return NO;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) encodeWithCoder: (NSCoder*)encoder
|
- (void) encodeWithCoder: (NSCoder*)encoder
|
||||||
|
|
|
@ -1160,7 +1160,7 @@ static NSUInteger _defaultBehavior = 0;
|
||||||
|
|
||||||
- (BOOL) generatesDecimalNubmers
|
- (BOOL) generatesDecimalNubmers
|
||||||
{
|
{
|
||||||
return _genDecimal;
|
return NO; // FIXME
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue