mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
([NSDate -copyWithZone:]): New method.
([NSDate -descriptionWithCalendarFormat:timeZone:]): Uncommented. ([NSDate -dateWithCalendarFormat:timeZone:]): Uncommented. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@534 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e20a78619b
commit
7cd03134f5
1 changed files with 14 additions and 4 deletions
|
@ -82,6 +82,12 @@
|
|||
|
||||
@implementation NSDate
|
||||
|
||||
- (id) copyWithZone: (NSZone*)zone
|
||||
{
|
||||
return [[[NSConcreteDate class] allocWithZone:zone]
|
||||
initWithTimeIntervalSinceReferenceDate:timeSinceReference];
|
||||
}
|
||||
|
||||
// Getting current time
|
||||
|
||||
+ (NSTimeInterval) timeIntervalSinceReferenceDate
|
||||
|
@ -178,13 +184,15 @@
|
|||
}
|
||||
|
||||
// Converting to NSCalendar
|
||||
#if 0
|
||||
|
||||
- (NSCalendarDate *) dateWithCalendarFormat: (NSString*)formatString
|
||||
timeZone: (NSTimeZone*)timeZone
|
||||
{
|
||||
// Not done yet, NSCalendarDate doesn't exist yet!
|
||||
[self notImplemented:_cmd];
|
||||
return nil;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Representing dates
|
||||
|
||||
|
@ -202,13 +210,15 @@
|
|||
strftime(buf, 64, "%Y-%m-%d %H:%M:%S", theTime);
|
||||
return [NSString stringWithCString: buf];
|
||||
}
|
||||
#if 0
|
||||
|
||||
- (NSString*) descriptionWithCalendarFormat: (NSString*)format
|
||||
timeZone: (NSTimeZone*)aTimeZone
|
||||
{
|
||||
// Not done yet, no NSCalendarDate or NSTimeZone...
|
||||
[self notImplemented:_cmd];
|
||||
return nil;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Adding and getting intervals
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue