allowsNaturalLanguage
日付フォーマッタが、自然言語を変換するかを返します
解説
日付フォーマッタが、自然言語を変換するかを返します。
YESであればMayやJunなどが月の名前として変換してくれます。
返り値
( BOOL )
YES/NO
引数
フレームワーク
Foundation
クラス
NSDateFormatter
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSDateFormatter *dateFormat = [[NSDateFormatter alloc] initWithDateFormat:@"%Y.%m.%d " allowNaturalLanguage:YES]; [myOutlet setFormatter:dateFormat]; if ([dateFormat allowsNaturalLanguage]){ NSLog(@"YES"); }else{ NSLog(@"NO"); } } @end