NSDate object represents a closed interval between two dates. The
NSDate class provides a programmatic interface for calculating the duration of a time interval and determining whether a date falls within it, as well as comparing date intervals and checking to see whether they intersect.
- iOS 10.0+
- macOS 10.12+
- tvOS 10.0+
- watchOS 3.0+
NSDate object consists of a
start and an
end of a date interval can be equal, in which case its
end cannot occur earlier than
You can use the
Date class to create string representations of
NSDate objects that are suitable for display in the current locale.