Changeset 20756
- Timestamp:
- 08/24/2007 01:28:23 PM (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Frameworks/AIUtilities Framework/Source/AIDateFormatterAdditions.m
r20752 r20756 201 201 NSString *timeString = nil; 202 202 NSTimeInterval workInterval = interval; 203 int weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0; 203 int weeks = 0, days = 0, hours = 0, minutes = 0; 204 NSTimeInterval seconds = 0; 204 205 NSString *weeksString = nil, *daysString = nil, *hoursString = nil, *minutesString = nil, *secondsString = nil; 205 206 … … 227 228 228 229 //Seconds 229 if (workInterval) { 230 seconds = (int)(interval / 60); 231 } 230 seconds = workInterval; 232 231 233 232 //build the strings for the parts … … 238 237 hoursString = [NSString stringWithFormat: @"%ih",hours]; 239 238 minutesString = [NSString stringWithFormat: @"%im",minutes]; 240 secondsString = [NSString stringWithFormat: @"% is",seconds];239 secondsString = [NSString stringWithFormat: @"%.0fs",seconds]; 241 240 } else { 242 241 weeksString = (weeks == 1) ? ONE_WEEK : [NSString stringWithFormat:MULTIPLE_WEEKS, weeks];