Enumeration

NSTimeZone.NameStyle

Constants you use to specify a style when presenting time zone names.

Declaration

enum NameStyle : Int

Topics

Constants

case standard

Specifies a standard name style. For example, “Central Standard Time” for Central Time.

case shortStandard

Specifies a short name style. For example, “CST” for Central Time.

case daylightSaving

Specifies a daylight saving name style. For example, “Central Daylight Time” for Central Time.

case shortDaylightSaving

Specifies a short daylight saving name style. For example, “CDT” for Central Time.

case generic

Specifies a generic name style. For example, “Central Time” for Central Time.

case shortGeneric

Specifies a generic time zone name. For example, “CT” for Central Time.

See Also

Getting Time Zone Information

var name: String

The geopolitical region ID that identifies the receiver.

var abbreviation: String?

The abbreviation for the receiver, such as “EDT” (Eastern Daylight Time).

func abbreviation(for: Date) -> String?

Returns the abbreviation for the receiver at a given date.

var secondsFromGMT: Int

The current difference in seconds between the receiver and Greenwich Mean Time.

func secondsFromGMT(for: Date) -> Int

Returns the difference in seconds between the receiver and Greenwich Mean Time at a given date.

var data: Data

The data that stores the information used by the receiver.

class var timeZoneDataVersion: String

Returns the time zone data version.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software