How to covert the NSTimeInterval to NSString? I have
NSTimeInterval today = [[NSDate date] timeIntervalSince1970];
I have to give \"today\" a
-(NSString*)formattedDuration:(NSTimeInterval)interval{
NSDateComponentsFormatter *formatter = [[NSDateComponentsFormatter alloc] init];
formatter.allowedUnits = NSCalendarUnitHour | NSCalendarUnitMinute;
formatter.zeroFormattingBehavior = NSDateComponentsFormatterZeroFormattingBehaviorPad;
NSString *string = [formatter stringFromTimeInterval:interval];
NSLog(@"%@", string);
// output: 0:20:34
return string;
}