Is this what you want?
NSDateFormatter *df = [[NSDateFormatter alloc] init]; df.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSPersianCalendar]; df.dateStyle = NSDateFormatterMediumStyle; df.dateFormat = @"yyyy/MM/dd"; NSString *stringDate = @"1391/04/07"; NSDate *date = [df dateFromString:stringDate]; NSLog(@"Date %@", date); df.calendar = [NSCalendar currentCalendar];
source share