Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tombuarts

macrumors newbie
Original poster
Jan 30, 2010
15
0
I have a datePicker control on one of my views. When I select Jan 1 or Jan 2 of any year, the datePicker returns the previous year. For example, selecting Jan 1, 2015, I get 2014 returned. Here is the code;

NSDate *dateb = datePicker.date;
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:mad:"MM/dd/yyyy"];
info.text = [df stringFromDate:dateb];

This is all of the code on the view, so I know there is nothing hidden anywhere affecting this. Any ideas?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.