mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
OSX compatibility tweaks inspiered by testplant
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35555 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5c55a3f1bd
commit
ab65e628d3
5 changed files with 50 additions and 13 deletions
|
@ -1132,6 +1132,12 @@ otherTime(NSDate* other)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) dateByAddingTimeInterval: (NSTimeInterval)seconds
|
||||
{
|
||||
return [[self class] dateWithTimeIntervalSinceReferenceDate:
|
||||
otherTime(self) + seconds];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an autoreleased instance of the [NSCalendarDate] class whose
|
||||
* date/time value is the same as that of the receiver, and which uses
|
||||
|
@ -1203,15 +1209,9 @@ otherTime(NSDate* other)
|
|||
return [s autorelease];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an autoreleased NSDate instance whose value if offset from
|
||||
* that of the receiver by seconds.
|
||||
*/
|
||||
- (id) addTimeInterval: (NSTimeInterval)seconds
|
||||
{
|
||||
/* xxx We need to check for overflow? */
|
||||
return [[self class] dateWithTimeIntervalSinceReferenceDate:
|
||||
otherTime(self) + seconds];
|
||||
return [self dateByAddingTimeInterval: seconds];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue