I have two NSMutableArray‘s [nowEvents and todayEvents] with a list of events.
For the first array I’d like to remove the events that are happening today
myEventClass *nowEvent = [appDelegate.nowEvents objectAtIndex:indexPath.row];
And for the 2nd one, the events that are happening now
myEventClass *todayEvent = [appDelegate.todayEvents objectAtIndex:indexPath.row];
The date,
NSDate *theDate = [NSDate date];
NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateFormat:@"dd/MM/yyyy"]; // Set the required date format
NSString *nowDate = [formatter stringFromDate:theDate];
UPDATE:
<event>
<name>My EventName</name>
<start_time>2011-10-13 19:30:00 +0200</start_time>
<end_time>2011-10-09 21:30:00 +0200</end_time>
</event>
Note: I’m parsing an xml list with today event list and adding it to two NSMutableArrays [nowEvents and todayEvents]
Want to have two sections with events: those which are happening today (in the current day) & now (haven’t finished yet or are happening now); that’s why I need to compare with date
How I’m amble to remove objects from these NSMutableArrays?
nowEvent – I need to compare with current (now) date
todayEvent – I need to compare with today date
Use