timeZone
Set this to specify a time zone to associate with this locale
- iOS
- 16+
- macOS
- 13+
- tvOS
- 16+
- watchOS
- 9+
var timeZone: TimeZone?
Corresponds to the “tz” key of the Unicode BCP 47 extension
Set this to specify a time zone to associate with this locale
var timeZone: TimeZone?
s20FoundationEssentials6LocaleV10ComponentsV8timeZoneAA04TimeF0VSgvp
What are these?7JX0F
Corresponds to the “tz” key of the Unicode BCP 47 extension
import FoundationEssentials
struct Components
Represents locale-related attributes. You can use Locale.Components
to create a Locale
with specific overrides.
struct Locale
Locale
encapsulates information about linguistic, cultural, and technological conventions and standards. Examples of information encapsulated by a locale include the symbol used for the decimal separator in numbers and the way dates are formatted.
struct TimeZone
TimeZone
defines the behavior of a time zone. Time zone values represent geopolitical regions. Consequently, these values have names for these regions. Time zone values also represent a temporal offset, either plus or minus, from Greenwich Mean Time (GMT) and an abbreviation (such as PST for Pacific Standard Time).
init(from decoder: any Decoder) throws
init(languageCode: Locale.LanguageCode? = nil, script: Locale.Script? = nil, languageRegion: Locale.Region? = nil)
Creates a Locale.Components
with the specified language code, script and region for the language
var calendar: Calendar.Identifier?
Set this to override the default calendar. To request the default calendar used by the locale, use Locale.calendar
var collation: Locale.Collation?
Set this to override the string sort order. To request the default calendar used by the locale, use Locale.calendar
var currency: Locale.Currency?
Set this to override the currency. To request the default currency used by the locale, use Locale.currency
var firstDayOfWeek: Locale.Weekday?
Set this to override the first day of the week. To request the default first day of the week preferred by the locale, use Locale.firstDayOfWeek
var hourCycle: Locale.HourCycle?
Set this to override the hour cycle. To request the default hour cycle, use Locale.hourCycle
var languageComponents: Locale.Language.Components
Represents the language identifier a locale
var measurementSystem: Locale.MeasurementSystem?
Set this to override the measurement system. To request the default measurement system, use Locale.measurementSystem
var numberingSystem: Locale.NumberingSystem?
Set this to override the numbering system. To request the default numbering system used by the locale, use Locale.numberingSystem
var region: Locale.Region?
Set this to override the region for region-related preferences, such as measuring system, calendar, and first day of the week. If unset, the region of the language component is used
var subdivision: Locale.Subdivision?
Set this to override the regional subdivision of region
var variant: Locale.Variant?
Set this to specify a variant used for the locale