NSMutableArray *mutable = [NSMutableArray arrayWithArray:searchFlightsHistoryArray];
//过期日期搜索记录去重
NSMutableIndexSet *indexSet = [[NSMutableIndexSet alloc] init];
for (int i = 0; i < mutable.count; i++) {
SearchFlightsHistory *indexData = mutable[i];
NSInteger diffDate = [NSDate dayIntervalWithADate:[NSDate date] BDate:indexData.departDate];
if (diffDate < 0) {
[indexSet addIndex:i];
}
}
if (indexSet.count >0) {
[mutable removeObjectsAtIndexes:indexSet];
}
//过期日期搜索记录去重
NSMutableIndexSet *indexSet = [[NSMutableIndexSet alloc] init];
for (int i = 0; i < mutable.count; i++) {
SearchFlightsHistory *indexData = mutable[i];
NSInteger diffDate = [NSDate dayIntervalWithADate:[NSDate date] BDate:indexData.departDate];
if (diffDate < 0) {
[indexSet addIndex:i];
}
}
if (indexSet.count >0) {
[mutable removeObjectsAtIndexes:indexSet];
}