Mono Class Library: System.Globalization.DateTimeFormatInfo Overview | Members

System.Globalization.DateTimeFormatInfo.GetMonthName Method

Gets the full name of the specified month based on the culture of the current thread. [Edit]

public string GetMonthName (int month)

Parameters

month
A int from 1 through 13 representing the month name to retrieve. [Edit]

Returns

A string containing the full name of the month represented by month. For cultures with 12-month calendars the empty string is returned as the name of the 13th month. [Edit]

Exceptions

TypeReason
ArgumentOutOfRangeExceptionmonth is less than 1 or greater than 13. [Edit]

Remarks

For the default (culture invariant) System.Globalization.DateTimeFormatInfo instance, this method returns one of the following strings:

monthReturn Value
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""

Note: This method supports calendars with 13 months.

[Edit]

Requirements

Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0