Am 31.05.2008 um 13:22 Uhr schrieb haresh vavdiya:

                NSCalendarDate *currentTime = [[NSCalendarDate alloc]
initWithTimeIntervalSinceReferenceDate:000000];

Since you specified a time interval of zero (one '0' is enough; it's just an integer), this will give you 1 January 2001, as stated by the documentation for -initWithTimeIntervalSinceReferenceDate:.

To get the current date you use

NSCalendarDate *currentDate = [NSCalendarDate calendarDate];

                 int minuteInc = (minute>=0 ? minute-[currentTime
minuteOfHour] : 0);
int hourInc = (hour>=0 ? hour-[currentTime hourOfDay] :
0);
                 [self incrementHour: hourInc andMinute:minuteInc];
                 [self time];

I have no idea what you are trying to do here ...


Andreas
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to