You can use date formatting as described in this post :
NSDateFormatter* formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateFormat:@"dd MMM yyyy"];
NSString* formattedDate = [formatter stringFromDate:date];
I believe that you can just put "th" at the end of dd in the format string. eg:
@"ddth MMM yyy
but I don’t have my Mac in front of me to check it out. If this does not work, you can try something like this:
[formatter setDateFormat:@"dd"];
NSString* day = [formatter stringFromDate:date];
[formatter setDateFormat:@"MMM yyyy"];
NSString* monthAndYear = [formatter stringFromDate:date];
NSString* date = [NSString stringWithFormat:@"%@th %@", day, monthAndYear];
source
share