Anonymous avatar Anonymous 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).

Comments (0)

Files changed (2)


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


-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;
 	} 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];
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.