Frameworks/AIUtilities Framework/Source/AIDateFormatterAdditions.m
branchadium-1.5.10.5
changeset 5997 d88e6711d0e0
parent 4724 d7c0b9fe1002
--- a/Frameworks/AIUtilities Framework/Source/AIDateFormatterAdditions.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIDateFormatterAdditions.m	Thu Nov 14 16:22:42 2019 -0500
@@ -355,10 +355,10 @@
 	//build the strings for the parts
 	if (abbreviate) {
 		//Note: after checking with a linguistics student, it appears that we're fine leaving it as w, h, etc... rather than localizing.
-		weeksString		= [NSString stringWithFormat: @"%iw",weeks];
-		daysString		= [NSString stringWithFormat: @"%id",days];
-		hoursString		= [NSString stringWithFormat: @"%ih",hours];
-		minutesString	= [NSString stringWithFormat: @"%im",minutes];
+        weeksString		= [NSString stringWithFormat: @"%liw",(long)weeks];
+		daysString		= [NSString stringWithFormat: @"%id",(int)days];
+		hoursString		= [NSString stringWithFormat: @"%ih",(int)hours];
+		minutesString	= [NSString stringWithFormat: @"%im",(int)minutes];
 		secondsString	= [NSString stringWithFormat: @"%.0fs",seconds];
 	} else {
 		weeksString		= (weeks == 1)		? ONE_WEEK		: [NSString stringWithFormat:MULTIPLE_WEEKS, weeks];
@@ -468,7 +468,7 @@
 					[newFormat appendString:@"%Y"];
 					break;
 				default:
-					[newFormat appendFormat:@"%%%iY", [span length]];
+                    [newFormat appendFormat:@"%%%luY", (unsigned long)[span length]];
 			}
 			
 		} else if (it == 'M') {