Commits

boredzo  committed 1bb7867

Renamed ISO8601DefaultTimeSeparatorCharacter to ISO8601ParserDefaultTimeSeparatorCharacter, so that the unparser can have its own.
Since I provide an assertion message, this needs to be NSAssert rather than NSParameterAssert. This fixes a build error (NSParameterAssert only expects one arg).

  • Participants
  • Parent commits b94ada4

Comments (0)

Files changed (2)

File NSCalendarDate+ISO8601Parsing.h

  */
 
 //The default separator for time values. Currently, this is ':'.
-extern unichar ISO8601DefaultTimeSeparatorCharacter;
+extern unichar ISO8601ParserDefaultTimeSeparatorCharacter;
 
 @interface NSCalendarDate(ISO8601Parsing)
 

File NSCalendarDate+ISO8601Parsing.m

 #ifndef DEFAULT_TIME_SEPARATOR
 #	define DEFAULT_TIME_SEPARATOR ':'
 #endif
-unichar ISO8601DefaultTimeSeparatorCharacter = DEFAULT_TIME_SEPARATOR;
+unichar ISO8601ParserDefaultTimeSeparatorCharacter = DEFAULT_TIME_SEPARATOR;
 
 static unsigned read_segment(const unsigned char *str, const unsigned char **next, unsigned *out_num_digits) {
 	unsigned num_digits = 0U;
 		dateOnly
 	} dateSpecification = monthAndDate;
 
-	if(strict) timeSep = ISO8601DefaultTimeSeparatorCharacter;
-	NSParameterAssert(timeSep != '\0', @"Time separator must not be NUL.");
+	if(strict) timeSep = ISO8601ParserDefaultTimeSeparatorCharacter;
+	NSAssert(timeSep != '\0', @"Time separator must not be NUL.");
 
 	BOOL isValidDate = ([str length] > 0U);
 	NSTimeZone *timeZone = nil;
 	return [self calendarDateWithString:str strictly:strict getRange:NULL];
 }
 + (NSCalendarDate *)calendarDateWithString:(NSString *)str strictly:(BOOL)strict getRange:(out NSRange *)outRange {
-	return [self calendarDateWithString:str strictly:strict timeSeparator:ISO8601DefaultTimeSeparatorCharacter getRange:NULL];
+	return [self calendarDateWithString:str strictly:strict timeSeparator:ISO8601ParserDefaultTimeSeparatorCharacter getRange:NULL];
 }
 
 + (NSCalendarDate *)calendarDateWithString:(NSString *)str timeSeparator:(unichar)timeSep getRange:(out NSRange *)outRange {
 	return [self calendarDateWithString:str strictly:NO timeSeparator:timeSep getRange:NULL];
 }
 + (NSCalendarDate *)calendarDateWithString:(NSString *)str getRange:(out NSRange *)outRange {
-	return [self calendarDateWithString:str strictly:NO timeSeparator:ISO8601DefaultTimeSeparatorCharacter getRange:outRange];
+	return [self calendarDateWithString:str strictly:NO timeSeparator:ISO8601ParserDefaultTimeSeparatorCharacter getRange:outRange];
 }
 
 @end