Found a lovely output for BOOL in the solution!


In three lines!

    NSTimeZone *LouKY = [NSTimeZone systemTimeZone];
    BOOL LouKYDST = [LouKY isDaylightSavingTime];
    NSLog(@"Is it currently Daylight Savings Time in Louisville? %s", LouKYDST ? "YES" : "NO");

I will use this output method for BOOL as long as I live :mrgreen:


Cool. I always use %i and pass the BOOL value, which returns 0 if false/NO and 1 if true/YES. But I like your approach.


Ahhh yes I remember reading about this. Can’t believe I forgot!


Nice! :smiley:


[quote=“Suraya”]In three lines!

That’s wonderful! I forgot all about the ? :
Funny, in only 13 chapters we all try our best to write as little lines of code as possible :slight_smile:


Taking it to extremes … one line

        NSLog(@"is it currently DST? %s", [[NSTimeZone systemTimeZone] isDaylightSavingTime] ? "yes" : "no");

I’m beginning to enjoy this game … and there was me thinking I was an old mainframe dinosaur :slight_smile:

Sorry being a smartar$e (for our colonial cousins smarta$$)