DateTimeFormatInfo.GetMonthName(Int32) メソッド

定義

現在の DateTimeFormatInfo オブジェクトに関連付けられたカルチャに基づいて、指定した月のカルチャ固有の完全名を返します。

public:
 System::String ^ GetMonthName(int month);
public string GetMonthName (int month);
member this.GetMonthName : int -> string
Public Function GetMonthName (month As Integer) As String

パラメーター

month
Int32

取得する月の名前を表す 1 ~ 13 の整数。

戻り値

month が表す月のカルチャ固有の完全名。

例外

month が 1 より小さいか、または 13 を超えています。

注釈

既定の不変 DateTimeFormatInfo オブジェクトの場合、このメソッドは オブジェクトから文字列を GregorianCalendar 返します。

month 戻り値
1 "January"
2 "2 月"
3 "March"
4 "April"
5 "May"
6 "June"
7 "7 月"
8 "August"
9 "9 月"
10 "October"
11 "11 月"
12 "December"
13 ""

Calendar オブジェクトは、13 か月のカレンダーに対応できます。 12 か月カレンダーの場合、空の文字列は常に 13 か月目の名前として返されます。

適用対象

こちらもご覧ください