DateTimeFormatInfo.GetAbbreviatedMonthName(Int32) 方法
定义
基于与当前 DateTimeFormatInfo 对象关联的区域性,返回指定月份的区域性特定的缩写名称。Returns the culture-specific abbreviated name of the specified month based on the culture associated with the current DateTimeFormatInfo object.
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 之间的一个整数,用于表示要检索的月份的名称。An integer from 1 through 13 representing the name of the month to retrieve.
返回
由 month 表示的月份的区域性特定的缩写名称。The culture-specific abbreviated name of the month represented by month.
例外
month 小于 1 或大于 13。month is less than 1 or greater than 13.
注解
对于默认的固定 DateTimeFormatInfo 对象,此方法从对象返回一个字符串 GregorianCalendar 。For the default invariant DateTimeFormatInfo object, this method returns a string from the GregorianCalendar object.
month |
返回值Return Value |
|---|---|
| 11 | 2006"Jan" |
| 22 | 96"Feb" |
| 33 | Mar"Mar" |
| 44 | 5"Apr" |
| 55 | 有助于"May" |
| 66 | 06"Jun" |
| 77 | 月"Jul" |
| 88 | Aug"Aug" |
| 99 | 月"Sep" |
| 1010 | Oct"Oct" |
| 1111 | 月"Nov" |
| 1212 | 十进制"Dec" |
| 1313 | """" |
Calendar 对象可以容纳包含13个月的日历。Calendar objects can accommodate calendars with 13 months. 对于12个月的日历,将始终以第13个月的名称返回空字符串。For 12-month calendars, the empty string is always returned as the name of the 13th month.