iOS 基础类解析 - NSDate

iOS 基础类解析 - NSDate

太阳火神的美丽人生 (http://blog.csdn.net/opengl_es)

本文遵循“署名-非商业用途-保持一致”创作公用协议

转载请保留此句:太阳火神的美丽人生 -  本博客专注于 敏捷开发及移动和物联设备研究:iOS、Android、Html5、Arduino、pcDuino否则,出自本博客的文章拒绝转载或再转载,谢谢合作。


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
Related sample code
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



你可能感兴趣的:(iOS 基础类解析 - NSDate)