mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-06 04:20:33 +00:00
Monotone-Parent: 072d560619f22b78e92501eb17c779b5ce668cac
Monotone-Revision: c6bfd1926ff53d5a648a5ff92a03176498297cf8 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-12-06T17:29:32 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSComparisonResult) compareEventsAscending: (NSArray *) otherEvent
|
||||
- (NSComparisonResult) compareEventsStartDateAscending: (NSArray *) otherEvent
|
||||
{
|
||||
NSComparisonResult result;
|
||||
unsigned int selfTime, otherTime;
|
||||
@@ -64,6 +64,43 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSComparisonResult) compareEventsEndDateAscending: (NSArray *) otherEvent
|
||||
{
|
||||
NSComparisonResult result;
|
||||
unsigned int selfTime, otherTime;
|
||||
|
||||
selfTime = [[self objectAtIndex: 5] intValue];
|
||||
otherTime = [[otherEvent objectAtIndex: 5] intValue];
|
||||
if (selfTime > otherTime)
|
||||
result = NSOrderedDescending;
|
||||
else if (selfTime < otherTime)
|
||||
result = NSOrderedAscending;
|
||||
else
|
||||
result = NSOrderedSame;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSComparisonResult) compareEventsTitleAscending: (NSArray *) otherEvent
|
||||
{
|
||||
NSString *selfTitle, *otherTitle;
|
||||
|
||||
selfTitle = [self objectAtIndex: 3];
|
||||
otherTitle = [otherEvent objectAtIndex: 3];
|
||||
|
||||
return [selfTitle caseInsensitiveCompare: otherTitle];
|
||||
}
|
||||
|
||||
- (NSComparisonResult) compareEventsLocationAscending: (NSArray *) otherEvent
|
||||
{
|
||||
NSString *selfTitle, *otherTitle;
|
||||
|
||||
selfTitle = [self objectAtIndex: 6];
|
||||
otherTitle = [otherEvent objectAtIndex: 6];
|
||||
|
||||
return [selfTitle caseInsensitiveCompare: otherTitle];
|
||||
}
|
||||
|
||||
- (NSComparisonResult) compareTasksAscending: (NSArray *) otherTask
|
||||
{
|
||||
NSComparisonResult result;
|
||||
@@ -96,4 +133,9 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSArray *) reversedArray
|
||||
{
|
||||
return [[self reverseObjectEnumerator] allObjects];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user