2
可能性の重複:次のコードを使用して
how do I get the day of the week using NSDate and show using NSLog in iOS?NSDateFormatterを使用して曜日を取得し、iOSでNSLogを使用して表示するにはどうすればよいですか?
。
NSDateFormatter* day = [[NSDateFormatter alloc] init];
[day setDateFormat: @"EEEE"];
NSLog(@"the day is: %@", [day stringFromDate:[NSDate date]]);
どのようにこの値を変数に入れますか?これは、あなたがそれを行う方法です
if (day == "monday")
{
...
}
のダブルポスト[どのように私はNSDateを使用して曜日を取得するとiOSでのNSLogを使用して表示していますか?](http://stackoverflow.com/questions/9874503/how-do-i-get 3時間前からnsdate-and-show-using-nslog-in-ios)を使用していました。ここで質問を再投稿しないでください。 –