Add 10.6 class method dateWithTimeInterval:sinceDate:

Patch by Marcian Lytwyn <marcian.lytwyn@advcsi.com>


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37230 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2013-10-14 22:30:33 +00:00
parent cf6cacf452
commit bc968c5a9f
3 changed files with 17 additions and 0 deletions

View file

@ -974,6 +974,15 @@ otherTime(NSDate* other)
seconds]);
}
/**
* Returns an autoreleased instance with the offset from the given date.
*/
+ (id) dateWithTimeInterval: (NSTimeInterval)seconds sinceDate: (NSDate*)date
{
return AUTORELEASE([[self alloc] initWithTimeInterval: seconds
sinceDate: date]);
}
/**
* Returns an autoreleased instance with th date/time set in the far
* future.