@@ -203,19 +203,19 @@ { return [[[self alloc] initWithTimeIntervalSinceNow: seconds] autorelease]; } -+ (instancetype)dateWithDateString: (OFString*)string - format: (OFString*)format ++ (instancetype)dateWithDateString: (OFString *)string + format: (OFString *)format { return [[[self alloc] initWithDateString: string format: format] autorelease]; } -+ (instancetype)dateWithLocalDateString: (OFString*)string - format: (OFString*)format ++ (instancetype)dateWithLocalDateString: (OFString *)string + format: (OFString *)format { return [[[self alloc] initWithLocalDateString: string format: format] autorelease]; } @@ -261,12 +261,12 @@ _seconds += seconds; return self; } -- initWithDateString: (OFString*)string - format: (OFString*)format +- initWithDateString: (OFString *)string + format: (OFString *)format { self = [super init]; @try { const char *UTF8String = [string UTF8String]; @@ -286,12 +286,12 @@ } return self; } -- initWithLocalDateString: (OFString*)string - format: (OFString*)format +- initWithLocalDateString: (OFString *)string + format: (OFString *)format { self = [super init]; @try { const char *UTF8String = [string UTF8String]; @@ -325,11 +325,11 @@ } return self; } -- initWithSerialization: (OFXMLElement*)element +- initWithSerialization: (OFXMLElement *)element { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); @@ -408,29 +408,29 @@ OFDate *otherDate; if (![object isKindOfClass: [OFDate class]]) @throw [OFInvalidArgumentException exception]; - otherDate = (OFDate*)object; + otherDate = (OFDate *)object; if (_seconds < otherDate->_seconds) return OF_ORDERED_ASCENDING; if (_seconds > otherDate->_seconds) return OF_ORDERED_DESCENDING; return OF_ORDERED_SAME; } -- (OFString*)description +- (OFString *)description { if (isinf(_seconds)) return (_seconds > 0 ? @"Distant Future" : @"Distant Past"); else return [self dateStringWithFormat: @"%Y-%m-%dT%H:%M:%SZ"]; } -- (OFXMLElement*)XMLElementBySerializing +- (OFXMLElement *)XMLElementBySerializing { void *pool = objc_autoreleasePoolPush(); OFXMLElement *element; union { double d; @@ -529,11 +529,11 @@ - (uint16_t)localDayOfYear { LOCALTIME_RET(tm_yday + 1) } -- (OFString*)dateStringWithFormat: (OFConstantString*)format +- (OFString *)dateStringWithFormat: (OFConstantString *)format { OFString *ret; time_t seconds = (time_t)_seconds; struct tm tm; size_t pageSize; @@ -589,11 +589,11 @@ } return ret; } -- (OFString*)localDateStringWithFormat: (OFConstantString*)format +- (OFString *)localDateStringWithFormat: (OFConstantString *)format { OFString *ret; time_t seconds = (time_t)_seconds; struct tm tm; size_t pageSize; @@ -649,11 +649,11 @@ } return ret; } -- (OFDate*)earlierDate: (OFDate*)otherDate +- (OFDate *)earlierDate: (OFDate *)otherDate { if (otherDate == nil) return [[self retain] autorelease]; if ([self compare: otherDate] == OF_ORDERED_DESCENDING) @@ -660,11 +660,11 @@ return [[otherDate retain] autorelease]; return [[self retain] autorelease]; } -- (OFDate*)laterDate: (OFDate*)otherDate +- (OFDate *)laterDate: (OFDate *)otherDate { if (otherDate == nil) return [[self retain] autorelease]; if ([self compare: otherDate] == OF_ORDERED_ASCENDING) @@ -676,11 +676,11 @@ - (of_time_interval_t)timeIntervalSince1970 { return _seconds; } -- (of_time_interval_t)timeIntervalSinceDate: (OFDate*)otherDate +- (of_time_interval_t)timeIntervalSinceDate: (OFDate *)otherDate { return _seconds - otherDate->_seconds; } - (of_time_interval_t)timeIntervalSinceNow @@ -694,10 +694,10 @@ seconds += (of_time_interval_t)t.tv_usec / 1000000; return _seconds - seconds; } -- (OFDate*)dateByAddingTimeInterval: (of_time_interval_t)seconds +- (OFDate *)dateByAddingTimeInterval: (of_time_interval_t)seconds { return [OFDate dateWithTimeIntervalSince1970: _seconds + seconds]; } @end