代码方法:

//日期阳历转换为农历;
- (NSString *)convertDateToNongLi:(NSString *)aStrDate
{
NSDate *dateTemp = nil;
NSDateFormatter *dateFormater = [[NSDateFormatter alloc]init];
[dateFormater setDateFormat:@"yyyy-MM-dd"];
dateTemp = [dateFormater dateFromString:aStrDate]; NSCalendar* calendar = [[NSCalendar alloc]initWithCalendarIdentifier:NSChineseCalendar];
NSDateComponents* components = [calendar components:NSMonthCalendarUnit|NSDayCalendarUnit fromDate:dateTemp];
NSString* nongliMonth = [UserInfo sharedUserInfo].chineseMonths[components.month-1];
NSString* nongliDay = [UserInfo sharedUserInfo].chineseDays[components.day-1];
NSString* nongliString = [NSString stringWithFormat:@"%@%@",nongliMonth,nongliDay]; return nongliString;
}

 使用:

    NSString *strDate = @"2012-06-24";
NSString *nongLi = [self convertDateToNongLi:strDate];

  

05-11 19:59