Skip to content

Instantly share code, notes, and snippets.

@amazedkoumei
Created May 20, 2012 20:57
Show Gist options
  • Save amazedkoumei/2759509 to your computer and use it in GitHub Desktop.
Save amazedkoumei/2759509 to your computer and use it in GitHub Desktop.
Objective-C logging
NSLog( @"class name: %@ method name: %@" , NSStringFromClass([self class]), NSStringFromSelector(_cmd) );
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
NSString *format = @"yyyy/MM/dd HH:mm:ss Z";
[formatter setDateFormat:format];
NSDate *date = [[NSDate alloc] initWithString:@"2010-01-01 23:59:59 +0900"];
NSLog(@"date:%@", [formatter stringFromDate:date]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment