notificationsArr = [notificationsArr sortedArrayUsingComparator:^NSComparisonResult(id item1, id item2) {
UILocalNotification *local1 = item1;
UILocalNotification *local2 = item2;
double one = [local1.fireDate timeIntervalSince1970];
double two = [local2.fireDate timeIntervalSince1970];
if (one > two) {
returnNSOrderedDescending;
} else if (one < two) {
return NSOrderedAscending;
} else {
return NSOrderedSame;
}
}];