Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Rashii Henry
16,433 PointsConvert the 'futureDate' object to a string object named 'dateString'.
Here's my code that promoted me up until step 4/4 on the coding challenges.
NSTimeInterval secondsPerDay = 60 * 60 * 24; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; // Add your code below NSDate *today = [NSDate date]; NSTimeInterval secondsPerTenDays = 60 * 60 * 24 * 10; NSDate *futureDate = [[NSDate alloc] init]; futureDate = [NSDate dateWithTimeIntervalSinceNow:secondsPerTenDays]; [dateFormatter setDateFormat:@"mm/dd/yyyy"];
however, when i type my code for the question above,
NSString *dateString = [dateFormatter stringFromDate:futureDate];
it tells me that now my step three is wrong.
1 Answer
David Kaneshiro Jr.
29,247 PointsTry changing your setDateFormat: value to @"MM/dd/yyyy". According the the website below lowercase 'm' is the symbol for minutes.
http://www.unicode.org/reports/tr35/tr35-25.html#Date_Format_Patterns
Other than that I don't see anything else that could be wrong.