<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/dates-and-times",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Dates and Times"
}
-->

# Dates and Times

Compare dates and times, and perform calendar and time zone calculations.

## Topics

### Date Representations

[`Date`](/documentation/Foundation/Date)

A specific point in time, independent of any calendar or time zone.

[`DateInterval`](/documentation/Foundation/DateInterval)

The span of time between a specific start date and end date.

[`TimeInterval`](/documentation/Foundation/TimeInterval)

A number of seconds.

### Date Representations

[`NSDate`](/documentation/Foundation/NSDate)

A representation of a specific point in time, independent of any calendar or time zone.

[`NSDateInterval`](/documentation/Foundation/NSDateInterval)

An object representing the span of time between a specific start date and end date.

[`TimeInterval`](/documentation/Foundation/TimeInterval)

A number of seconds.

### Calendrical Calculations

[`DateComponents`](/documentation/Foundation/DateComponents)

A date or time specified in terms of units (such as year, month, day, hour, and minute) to be evaluated in a calendar system and time zone.

[`Calendar`](/documentation/Foundation/Calendar)

A definition of the relationships between calendar units and absolute points in time, providing features for calculation and comparison of dates.

[`TimeZone`](/documentation/Foundation/TimeZone)

Information about standard time conventions associated with a specific geopolitical region.

### Calendrical Calculations

[`NSDateComponents`](/documentation/Foundation/NSDateComponents)

An object that specifies a date or time in terms of units (such as year, month, day, hour, and minute) to be evaluated in a calendar system and time zone.

[`NSCalendar`](/documentation/Foundation/NSCalendar)

A definition of the relationships between calendar units and absolute points in time, providing features for calculation and comparison of dates.

[`NSTimeZone`](/documentation/Foundation/NSTimeZone)

Information about standard time conventions associated with a specific geopolitical region.

### Date Formatting

[`DateFormatter`](/documentation/Foundation/DateFormatter)

A formatter that converts between dates and their textual representations.

[`DateComponentsFormatter`](/documentation/Foundation/DateComponentsFormatter)

A formatter that creates string representations of quantities of time.

[`DateIntervalFormatter`](/documentation/Foundation/DateIntervalFormatter)

A formatter that creates string representations of time intervals.

[`ISO8601DateFormatter`](/documentation/Foundation/ISO8601DateFormatter)

A formatter that converts between dates and their ISO 8601 string representations.

### Internationalization

[`Locale`](/documentation/Foundation/Locale)

Information about linguistic, cultural, and technological conventions for use in formatting data for presentation.

### Internationalization

[`NSLocale`](/documentation/Foundation/NSLocale)

Information about linguistic, cultural, and technological conventions for use in formatting data for presentation.

### Deprecated

[`NSCalendarDate`](/documentation/Foundation/NSCalendarDate)

A specialized date object with embedded calendar information.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)