Challenge - my solution


The following is my solution for the challenge. I used locale information for Greenland, just for some additional challenge.
Basically I’m displaying Weekday, year, month, day, era, day of year, day of month, Julian, hour, minute, seconds, am/pm, time zone.

-(NSString *)description { NSDateFormatter *df = [[NSDateFormatter alloc] init]; // [df setTimeStyle:NSDateFormatterNoStyle]; // [df setDateStyle:NSDateFormatterMediumStyle]; [df setDateFormat:@"eeee'('EEEE')': yyyy'('u')'.MMMM'('LLLL')'.dd G d D g 'at' HH:mm:ssa zzzz 'or' ZZZZ"]; [df setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"kl_GL"]]; NSString *result; result = [[NSString alloc] initWithFormat:@"%@: %d, %d", [df stringFromDate:entryDate], firstNumber, secondNumber]; return result; }


For the sake of convenience, the latest (Formatters in Mac OS X v10.6 use version tr35-10) date formatter string patterns are available here: … t_Patterns