Reputation: 11935
how can i get a string with this format date: "Sunday 24"? with this code
NSDate *startTime = [NSDate date];
NSDateFormatter *formatDate = [[NSDateFormatter alloc] init];
[formatDate setTimeStyle:NSDateFormatterMediumStyle];
[formatDate setDateFormat:@"EEEE dd"];
NSString *date = [formatDate stringFromDate:startTime];
i have
"sunday 24"
how can i get a capital letter?
Upvotes: 0
Views: 1088
Reputation: 51374
You should capitalize it explicitly.
NSString *date = [[formatDate stringFromDate:startTime] capitalizedString];
Upvotes: 2