次の方法で共有


DateTimeFormatInfo.GetMonthName メソッド

現在のスレッドの CultureInfo に基づいて、指定した月のカルチャ固有の完全名を返します。

Public Function GetMonthName( _
   ByVal month As Integer _) As String
[C#]
public string GetMonthName(intmonth);
[C++]
public: String* GetMonthName(intmonth);
[JScript]
public function GetMonthName(
   month : int) : String;

パラメータ

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

戻り値

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

例外

例外の種類 条件
ArgumentOutOfRangeException month が 1 未満か、13 よりも大きい値です。

解説

既定のインバリアントな DateTimeFormatInfo では、このメソッドは GregorianCalendar から文字列を返します。

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

Calendar オブジェクトは、13 か月ある暦を受け入れることができます。12 か月の暦では、13 番目の月の名前として、常に空の文字列が返されます。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET, Common Language Infrastructure (CLI) Standard

参照

DateTimeFormatInfo クラス | DateTimeFormatInfo メンバ | System.Globalization 名前空間 | Calendar | CultureInfo | GregorianCalendar | MonthNames