Instance Property インスタンスプロパティ

unitsStyle

The formatting style for unit names. 単位名に対する書式設定スタイル。

Declaration 宣言

var unitsStyle: DateComponentsFormatter.UnitsStyle { get set }

Discussion 議論

Configures the strings to use (if any) for unit names such as days, hours, minutes, and seconds. Use this property to specify whether you want abbreviated or shortened versions of unit names—for example, hrs instead of hours. 文字列を配列して、日、時、分、そして秒などの単位名に(もしあれば)使ってください。このプロパティを使って、あなたが単位名の省略または短縮版のどちらを望むのかを指定してください — 例えばhrshoursの代わりに。

The default value of this property is DateComponentsFormatter.UnitsStyle.positional. このプロパティの省略時の値は、DateComponentsFormatter.UnitsStyle.positionalです。

See Also 参照

Configuring the Formatter Options フォーマッタオプションを構成設定する