initWithString:
文字列で日付時間(NSDate)を初期化して返します
-(id)initWithString:(NSString *)description:
解説
文字列で日付時間(NSDate)を初期化して返します。
フォーマットは YYYY-MM DD HH:MM:SS±HHMM となります。
返り値
( id )
時間
引数
( NSString * )description
時間をあらわす文字列
フレームワーク
Foundation
クラス
NSDate
Instance Methods
使用可能
10.0
参照
+ dateWithString:
- description
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSDate *theDate = [[NSDate alloc] initWithString:@"2002-12-03 04:56:00 +0900"]; [myOutlet setStringValue:[theDate description]]; } @end