Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 5 additions and 5 deletions.
  1. +5 −5 ISO8601DateFormatter.m
View
10 ISO8601DateFormatter.m
@@ -45,10 +45,10 @@ + (void) initialize {
+ (void) purgeGlobalCaches {
NSMutableDictionary *oldCache = timeZonesByOffset;
timeZonesByOffset = nil;
+ #if __has_feature(objc_arc)
+ [oldCache removeAllObjects];
+ #endif
SAFE_ARC_RELEASE(oldCache);
- #if __has_feature(objc_arc)
- [oldCache removeAllObjects];
- #endif
}
- (NSCalendar *) makeCalendarWithDesiredConfiguration {
@@ -671,7 +671,7 @@ - (NSString *) stringFromDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone {
case ISO8601DateFormatOrdinal:
return [self stringFromDate:date formatString:ISO_ORDINAL_DATE_FORMAT timeZone:timeZone];
default:
- [NSException raise:NSInternalInconsistencyException format:@"self.format was %d, not calendar (%d), week (%d), or ordinal (%d)", self.format, ISO8601DateFormatCalendar, ISO8601DateFormatWeek, ISO8601DateFormatOrdinal];
+ [NSException raise:NSInternalInconsistencyException format:@"self.format was %u, not calendar (%d), week (%d), or ordinal (%d)", self.format, ISO8601DateFormatCalendar, ISO8601DateFormatWeek, ISO8601DateFormatOrdinal];
return nil;
}
}
@@ -705,7 +705,7 @@ - (NSString *) stringFromDate:(NSDate *)date formatString:(NSString *)dateFormat
if (offset == 0)
str = [str stringByAppendingString:ISO_TIMEZONE_UTC_FORMAT];
else
- str = [str stringByAppendingFormat:ISO_TIMEZONE_OFFSET_FORMAT, offset / 60, offset % 60];
+ str = [str stringByAppendingFormat:ISO_TIMEZONE_OFFSET_FORMAT, (int)offset / 60, (int)offset % 60];
}
//Undo the change we made earlier

No commit comments for this range

Something went wrong with that request. Please try again.