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
"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?
NSDate *dateb = datePicker.date;
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat
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?