Skip to content

Instantly share code, notes, and snippets.

@is8r
Created June 29, 2014 10:56
Show Gist options
  • Save is8r/6671ada6759bca6a5cf9 to your computer and use it in GitHub Desktop.
Save is8r/6671ada6759bca6a5cf9 to your computer and use it in GitHub Desktop.
NSMutableArray *mList = [[Calendar instance] create:2009 month:10];
NSString* s;
switch ([[[mList objectAtIndex:0] objectForKey:@"w"] intValue])
{
case 1:
s = @"月";
break;
case 2:
s = @"火";
break;
case 3:
s = @"水";
break;
case 4:
s = @"木";
break;
case 5:
s = @"金";
break;
case 6:
s = @"土";
break;
case 7:
s = @"日";
break;
}
//
NSLog(@"10月1日は [%@] 曜日", s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment