我有日期的數組格式爲:如何將日期對象與Objective-C中的字符串進行比較?
date: 2012-01-02,2012-03-17,2012-04-09,2012-05-07,2012-06-04,2012-08-06,2012-10-29,2012-12-25,2012-12-26.
我想比較今天的日期的日期,但我需要一些幫助。這是我的代碼。
NSArray *date =[dict12 objectForKey:@"ie_date_closed"];
NSLog(@"date:%@",date);
int i=date;
for (i=0; i<6; i++)
{
NSComparisonResult result = [todaydate compare:date[i]];
NSLog(@"result:%d",result);
}
您面臨的問題是什麼? – Mayur
我只是嘗試這是行不通的。幫助我使用你的代碼。 – janagowtham
我想比較nsarray日期和今天的日期。 – janagowtham