Instance Method インスタンスメソッド

stringFromDateComponents:

Returns a formatted string based on the specified date component information. 指定された日付構成要素情報に基づいて書式設定された文字列を返します。

Declaration 宣言

- (NSString *)stringFromDateComponents:(NSDateComponents *)components;

Parameters パラメータ

components

A date components object containing the date and time information to format. The allowedUnits property determines which date components are actually used to generate the string. All other date components are ignored. This parameter must not be nil. 書式設定する日付と時刻情報を含んでいる、日付構成要素オブジェクト。allowedUnitsプロパティは、どの日付構成要素が実際に文字列を生成するのに使われるかを決定します。全ての他の日付構成要素は、無視されます。このパラメータは、nilであってはいけません。

Return Value 戻り値

A formatted string representing the specified date information. 指定された日付情報を表している、ある書式設定された文字列。

Discussion 議論

Use this method to format date information that is already broken down into the component day and time values. 既に構成要素の日にちと時間値へと分解される日付情報を、このメソッドを使って書式設定してください。

See Also 参照

Formatting Values 書式設定値