I am using core data to store objects for my project.There is a date field in the object .I want to check against the clicked date of the Tapku calendar component for iphone. The date on my object is in the format
2011-01-10 and it is a localized date .
How can i check the date against the date returned from the tapku calendar control.
Could do with a bit more information but the tapku library has an extension method on NSDate called isSameDay so you could use that:
Is that what you are looking for?
Yes you can, here is what I did to make it work:
on the method: (NSArray*)calendarMonthView:(TKCalendarMonthView *)monthView marksFromDate:(NSDate *)startDate toDate:(NSDate *)lastDate
WARNING: make sure you cast your NSDate objects to a no time and GMT:0 dates in order to make the day comparison to work (learned this the hard way...)
Here is some code...
The midnightUTC method can be found here: http://www.voidasterisk.org/post/4209842795/how-to-calculate-nsdate-of-midnight-in-ios