GregorianCalendar.IsLeapMonth
Imports System
Imports System.Globalization
Imports Microsoft.VisualBasic
Public Class SamplesGregorianCalendar
Public Shared Sub Main()
Dim myCal As New GregorianCalendar()
Dim iMonthsInYear As Integer
Dim y As Integer
For y = 2001 To 2005
iMonthsInYear = myCal.GetMonthsInYear(y, GregorianCalendar.CurrentEra)
Dim m As Integer
For m = 1 To iMonthsInYear
Console.Write("{0}", myCal.IsLeapMonth(y, m, GregorianCalendar.CurrentEra))
Next m
Next y
End Sub
End Class
Related examples in the same category