mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
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:
parent
7e61c2d1bb
commit
7e311fc44d
3 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2013-10-15 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Headers/Foundation/NSDate.h,
|
||||||
|
* Source/NSDate.m:
|
||||||
|
Add 10.6 class method dateWithTimeInterval:sinceDate:
|
||||||
|
Patch by Marcian Lytwyn <marcian.lytwyn@advcsi.com>
|
||||||
|
|
||||||
2013-10-04 Richard Frith-Macdonald <rfm@gnu.org>
|
2013-10-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSTimeZone.m: Fix bug with byte swapping ... use NSByteOrder.h
|
* Source/NSTimeZone.m: Fix bug with byte swapping ... use NSByteOrder.h
|
||||||
|
|
|
@ -112,6 +112,7 @@ GS_EXPORT const NSTimeInterval NSTimeIntervalSince1970;
|
||||||
* that of the receiver by the specified interval.
|
* that of the receiver by the specified interval.
|
||||||
*/
|
*/
|
||||||
- (id) dateByAddingTimeInterval: (NSTimeInterval)ti;
|
- (id) dateByAddingTimeInterval: (NSTimeInterval)ti;
|
||||||
|
+ (id) dateWithTimeInterval: (NSTimeInterval)seconds sinceDate: (NSDate*)date;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||||
|
|
|
@ -974,6 +974,15 @@ otherTime(NSDate* other)
|
||||||
seconds]);
|
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
|
* Returns an autoreleased instance with th date/time set in the far
|
||||||
* future.
|
* future.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue