if (_cycleEndTf.text.length != 0) {
NSDate *currentDate = [NSDate date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
NSString *dateString = [dateFormatter stringFromDate:currentDate];
NSString *startStr = [Utility timeStringSecondStyleWithDate:_cycleStartTF.selectDate];
self.startTime = [NSString stringWithFormat:@"%@:00", startStr];
NSString *endStr = [Utility timeStringSecondStyleWithDate:_cycleEndTf.selectDate];
self.endTime = [NSString stringWithFormat:@"%@:00", endStr];
NSComparisonResult result = [startStr compare:endStr];
if (result == NSOrderedDescending) {
ZZXAlert(@"请选择正确的日期");
}else if (result == NSOrderedSame) {
ZZXAlert(@"请选择正确的日期");
}else {
NSString *starFullStr = [NSString stringWithFormat:@"%@ %@", dateString, self.startTime];
NSString *endFullStr = [NSString stringWithFormat:@"%@ %@", dateString, self.endTime];
NSString *resultStr = [Common intervalFromLastDate:starFullStr toTheDate:endFullStr];
_cycleTotleTime.text = resultStr;
NSMutableAttributedString *attributeStr = [[NSMutableAttributedString alloc]initWithString:_cycleTotleTime.text];
NSDictionary *attrs = @{NSFontAttributeName:Font24,NSForegroundColorAttributeName:ColorRed};
[attributeStr addAttributes:attrs range:NSMakeRange(3, 2)];
[attributeStr addAttributes:attrs range:NSMakeRange(7, 2)];
_cycleTotleTime.attributedText = attributeStr;
}