diff -r d84d25d6cdbb -r 2d492d8c2053 TimeIntervalFormatter.m --- a/TimeIntervalFormatter.m Sat Mar 08 21:04:41 2008 -0800 +++ b/TimeIntervalFormatter.m Fri Apr 18 09:25:10 2008 -0700 @@ -11,6 +11,15 @@ @implementation TimeIntervalFormatter +- (id) init +{ + self = [super init]; + if (self != nil) { + _showsMinutes = YES; + } + return self; +} + - (void) awakeFromNib { _showsMinutes = YES; @@ -19,6 +28,14 @@ - (void) setShowsMinutes: (BOOL)show {_showsMinutes = show;} - (void) setShowsFractionalSeconds: (BOOL)show {_showsFractionalSeconds = show;} ++ (NSString*) formatTimeInterval: (NSTimeInterval)interval +{ + TimeIntervalFormatter *fmt = [[self alloc] init]; + NSString *result = [fmt stringForObjectValue: [NSNumber numberWithDouble: interval]]; + [fmt release]; + return result; +} + - (NSString*) stringForObjectValue: (id)object {