From 7cd03134f594ab93735dde6370e6e5c2b0c908c3 Mon Sep 17 00:00:00 2001 From: mccallum Date: Tue, 8 Aug 1995 15:46:04 +0000 Subject: [PATCH] ([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 --- Source/NSDate.m | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Source/NSDate.m b/Source/NSDate.m index d588d737c..2e92497af 100644 --- a/Source/NSDate.m +++ b/Source/NSDate.m @@ -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