discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCalendarDate problem


From: Richard Frith-Macdonald
Subject: Re: NSCalendarDate problem
Date: Thu, 3 Jul 2003 20:07:50 +0100


On Thursday, July 3, 2003, at 07:47  pm, Andreas Hoeschler wrote:

Hi all,

the two lines

NSCalendarDate *date = [[NSCalendarDate alloc] initWithYear:0 month:0 day:0 hour:18 minute:0 second:0 timeZone:nil];
      NSLog(@"date %@", date);

produce the following output.

2003-07-03 20:44:40.516 FBTest[18838] File NSCalendarDate.m: 1239. In [NSCalendarDate -initWithYear:month:day:hour:minute:second:timeZone:] invalid month given - 0 2003-07-03 20:44:40.526 FBTest[18838] File NSCalendarDate.m: 1244. In [NSCalendarDate -initWithYear:month:day:hour:minute:second:timeZone:] invalid day given - 0
2003-07-03 20:44:40.526 FBTest[18838] date 0000-01-01 06:00:00 +0100

I assume this is a bug. It's a few months since I got a current version from cvs. Has this problem been fixed in the meanwhile or should I look into the sources myself?

GNUstep is obviously trying to be tolerant of programmer errors, and restrict the arguments to the valid range. What behavior are you expecting? Do you know if MacOS-X causes an exception to be raised or the object to be deallocated and nil returned? The OpenStep spec and MacOS-X documentation don't specify the behavior, so technically there's nothing wrong with the current behavior.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]