NSDate:timeIntervalSinceReferenceDate
Home 目次>Foundation>NSDate このサイトはこちらに移転しました。

timeIntervalSinceReferenceDate

グリニッジ標準時の2001年1月1日0時0分0秒と現在との差を秒数で返します


+(NSTimeInterval) timeIntervalSinceReferenceDate


【返り値】
   NSTimeInterval時間間隔


【解説】

グリニッジ標準時(GMT)の2001年1月1日0時0分0秒と現在の日付時間との差を秒数(NSTimeInterval)で返します。



【例文】


#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSDate *theDate1 = [NSDate dateWithString:@"2002-12-03 04:56:00 +0900"];
NSLog([NSString stringWithFormat:@"%.1f",[theDate1 timeIntervalSinceReferenceDate]]);
}
@end


(C) 2000-2009 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>Foundation>NSDate
修正日2006.12.26