首页 > 代码库 > iOS 基础类解析 - NSDate
iOS 基础类解析 - NSDate
NSDate Class Reference
Inherits from | NSObject |
Conforms to | NSCopying NSSecureCoding NSObject (NSObject) |
Framework | /System/Library/Frameworks/Foundation.framework |
Availability | Available in iOS 2.0 and later. |
Declared in | NSDate.h |
Companion guides | Date and Time Programming Guide Property List Programming Guide |
MVCNetworking TableView Fundamentals for iOS TopSongs URLCache XMLPerformance |
Creating and Initializing Date Objects
+ date
+ dateWithTimeIntervalSinceNow:
+ dateWithTimeInterval:sinceDate:
+ dateWithTimeIntervalSinceReferenceDate:
+ dateWithTimeIntervalSince1970:
– init
– initWithTimeIntervalSinceNow:
– initWithTimeInterval:sinceDate:
– initWithTimeIntervalSinceReferenceDate:
– initWithTimeIntervalSince1970:
Getting Temporal Boundaries
+ distantFuture
+ distantPast
Comparing Dates
– isEqualToDate:
– earlierDate:
– laterDate:
– compare:
Getting Time Intervals
– timeIntervalSinceDate:
– timeIntervalSinceNow
+ timeIntervalSinceReferenceDate
– timeIntervalSinceReferenceDate
– timeIntervalSince1970
Adding a Time Interval
– dateByAddingTimeInterval:
– addTimeInterval:
Deprecated in iOS 4.0
Representing Dates as Strings
– description
– descriptionWithLocale:
Copyright ? 2013 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2013-09-18
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。