DateTimeFormatInfo.GetAbbreviatedMonthName(Int32) 方法

定义

基于与当前 DateTimeFormatInfo 对象关联的区域性,返回指定月份的区域性特定的缩写名称。

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

参数

month
Int32

1 到 13 之间的一个整数,用于表示要检索的月份的名称。

返回

month 表示的月份的区域性特定的缩写名称。

例外

month 小于 1 或大于 13。

注解

对于默认固定 DateTimeFormatInfo 对象,此方法从 GregorianCalendar 对象返回字符串。

month 返回值
1 “Jan”
2 “Feb”
3 “Mar”
4 “Apr”
5 “May”
6 “Jun”
7 “Jul”
8 “Aug”
9 “Sep”
10 “Oct”
11 “Nov”
12 “Dec”
13 ""

Calendar 对象可以容纳包含 13 个月的日历。 对于 12 个月日历,空字符串始终作为第 13 个月的名称返回。

适用于

另请参阅