Currently I failed to convert a day of the year integer to a formatted string / date like mm-dd. I tried some different solution approaches, including most of the solutions which are posted here - without success.
I expect this: Today is the 359 day of the year - and it should be converted to 12-25
Takeshi Okada
12-Nov-2014NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents* components = [[NSDateComponents alloc] init];
[components setDay:359];
[components setYear:2013];
[components setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
NSDate* day359 = [gregorian dateFromComponents:components];
output
2013-12-25 00:00:00 +0000