本文整理汇总了VB.NET中System.Globalization.UmAlQuraCalendar.GetDaysInYear方法的典型用法代码示例。如果您正苦于以下问题:VB.NET UmAlQuraCalendar.GetDaysInYear方法的具体用法?VB.NET UmAlQuraCalendar.GetDaysInYear怎么用?VB.NET UmAlQuraCalendar.GetDaysInYear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。
在下文中一共展示了UmAlQuraCalendar.GetDaysInYear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Example
' 导入命名空间
Imports System.Globalization
Module Example
Public Sub Main()
Dim cal As New UmAlQuraCalendar()
Dim currentYear As Integer = cal.GetYear(Date.Now)
Console.WriteLine("Era Year Days")
Console.WriteLine()
For Each era As Integer In cal.Eras
For year As Integer = currentYear To currentYear + 9
Console.WriteLine("{0}{1} {2} {3}",
ShowCurrentEra(cal, era), era, year,
cal.GetDaysInYear(year, era))
Next
Next
Console.WriteLine()
Console.WriteLine(" * Indicates the current era.")
End Sub
Private Function ShowCurrentEra(cal As Calendar, era As Integer) As String
If era = cal.Eras(Calendar.CurrentEra) Then
Return "*"
Else
Return " "
End If
End Function
End Module
输出:
Era Year Days *1 1431 354 *1 1432 354 *1 1433 355 *1 1434 354 *1 1435 355 *1 1436 354 *1 1437 354 *1 1438 354 *1 1439 355 *1 1440 354 * Indicates the current era.