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