我有一个NSDictionary
看起来像。从nsdictionary选择特定日期
dic is : {
city = #;
country = #;
date = "2011-08-12 05:00:00 +0000";
"day_of_week" = Fri;
high = 79;
icon = "/ig/images/weather/chance_of_storm.gif";
low = 61;
startdate = "2011-08-12 05:00:00 +0000";
state = #;
}
dic is : {
city = #;
country = #;
date = "2011-08-13 05:00:00 +0000";
"day_of_week" = Fri;
high = 79;
icon = "/ig/images/weather/chance_of_storm.gif";
low = 61;
startdate = "2011-08-12 05:00:00 +0000";
state = #;
}
dic is : {
city = #;
country = #;
date = "2011-08-14 05:00:00 +0000";
"day_of_week" = Sat;
high = 79;
low = 58;
startdate = "2011-08-12 05:00:00 +0000";
state = #;
}
if(([dd1 earlierDate:startDate]) &&[dd1 earlierDate:endDate])
{
/*if([dd1 isEqualToDate:startDate] || [dd1 isEqualToDate:endDate])
我从测试用例传递NSDate
秒。 Startdate和Enddate从测试用例中传递,dd1从日期解析器传递。我正在尝试获取2个日期之间的值,但得到所有4个日期。什么是解决方案只获取我希望的日期值?
DD1 IS的NSDate对象,却看到它NSDICTIONARY.SO DD1 IS RUNNING内部的for循环我的抵达时间存在201-08-12,2011-08-13 ETC
这对你有没有帮助? http://stackoverflow.com/questions/7032347/get-date-from-an-nsdictionary-and-match-them – Joe