NSDateFormatter incorrect date on simulator, correct date on device
- by Rudiger
Hi,
Im building a calendar and to find out the first day of the month I do
[formatter setDateFormat:@"e"];
int startDay = [[formatter stringFromDate:newDate] intValue];
On the device this works correctly and the 1st of the month is on the correct day. But on the simulator it is the day after. Although it doesn't overly matter about the simulator it is kind of driving me crazy thinking I've done something wrong. I tried to set the locale of the formatter but no difference, nor i think should it. Can anyone shed some light on this?
On a side note is there a better way to build a calendar than this?