Minor fixes

This commit is contained in:
Gregory John Casamento 2019-10-24 19:38:19 -04:00
parent 058762c8c5
commit a251bbbb58
2 changed files with 4 additions and 5 deletions

View file

@ -167,12 +167,12 @@
- (NSDateInterval *) intersectionWithDateInterval: (NSDateInterval *)dateInterval
{
NSDateInterval *result = nil;
NSArray *array = [NSArray arrayWithObjects: self, dateInterval, nil];
NSArray *sortedArray = [array sortedArrayUsingSelector: @selector(compare:)];
NSDateInterval *first = [sortedArray firstObject];
NSDateInterval *last = [sortedArray lastObject];
NSDateInterval *first = self; //[sortedArray firstObject];
NSDateInterval *last = dateInterval; // [sortedArray lastObject];
NSDate *intersectStartDate = nil;
NSDate *intersectEndDate = nil;
// NSArray *array = [NSArray arrayWithObjects: self, dateInterval, nil];
// NSArray *sortedArray = [array sortedArrayUsingSelector: @selector(compare:)];
// Max of start date....
if([[first startDate] compare: [last startDate]] == NSOrderedAscending ||

View file

@ -103,7 +103,6 @@
- (NSString *) stringFromDateInterval: (NSDateInterval *)dateInterval
{
NSString *result = nil;
NSDate *fromDate = [dateInterval startDate];
NSDate *toDate = [dateInterval endDate];