本文整理匯總了VB.NET中System.Globalization.DateTimeFormatInfo.AbbreviatedMonthGenitiveNames屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET DateTimeFormatInfo.AbbreviatedMonthGenitiveNames屬性的具體用法?VB.NET DateTimeFormatInfo.AbbreviatedMonthGenitiveNames怎麽用?VB.NET DateTimeFormatInfo.AbbreviatedMonthGenitiveNames使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Globalization.DateTimeFormatInfo
的用法示例。
在下文中一共展示了DateTimeFormatInfo.AbbreviatedMonthGenitiveNames屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Example
' 導入命名空間
Imports System.Globalization
Module Example
Public Sub Main()
Dim ci As CultureInfo = CultureInfo.CreateSpecificCulture("en-US")
Dim dtfi As DateTimeFormatInfo = ci.DateTimeFormat
dtfi.AbbreviatedMonthNames = { "of Jan", "of Feb", "of Mar",
"of Apr", "of May", "of Jun",
"of Jul", "of Aug", "of Sep",
"of Oct", "of Nov", "of Dec", "" }
dtfi.AbbreviatedMonthGenitiveNames = dtfi.AbbreviatedMonthNames
Dim dat As Date = #05/28/2012#
For ctr As Integer = 0 To dtfi.Calendar.GetMonthsInYear(dat.Year) - 1
Console.WriteLine(dat.AddMonths(ctr).ToString("dd MMM yyyy", dtfi))
Next
End Sub
End Module
開發者ID:VB.NET開發者,項目名稱:System.Globalization,代碼行數:19,代碼來源:DateTimeFormatInfo.AbbreviatedMonthGenitiveNames
輸出:
28 of May 2012 28 of Jun 2012 28 of Jul 2012 28 of Aug 2012 28 of Sep 2012 28 of Oct 2012 28 of Nov 2012 28 of Dec 2012 28 of Jan 2013 28 of Feb 2013 28 of Mar 2013 28 of Apr 2013