This is MiscClockView_Foundation.m in view mode; [Download] [Up]
#import <foundation/NSDate.h>
#import "MiscClockView_Foundation.h"
@implementation MiscClockView(NSCalendarDate)
- (void) setCalendarDate:(NSCalendarDate*) aDate
{
seconds = [aDate secondOfMinute];
minutes = [aDate minuteOfHour];
hours = [aDate hourOfDay];
date = [aDate dayOfMonth];
month = [aDate monthOfYear]-1;
year = [aDate yearOfCommonEra]-1900;
weekday = [aDate dayOfWeek];
}
- (NSCalendarDate*) calendarDate
{
NSCalendarDate *calendarDate;
calendarDate = [NSCalendarDate dateWithYear:year+1900
month:month+1
day:date
hour:hours
minute:minutes
second:seconds
timeZone:[NSTimeZone localTimeZone]];
return calendarDate;
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.