Mega Code Archive

 
Categories / VB.Net Tutorial / Date Time
 

Call IsLeapMonth for all the months in five years in the current era

Imports System Imports System.Globalization Imports Microsoft.VisualBasic Public Class SamplesJulianCalendar       Public Shared Sub Main()       Dim myCal As New JulianCalendar()       Dim iMonthsInYear As Integer       Dim y As Integer       For y = 2001 To 2005          iMonthsInYear = myCal.GetMonthsInYear(y, JulianCalendar.CurrentEra)          Dim m As Integer          For m = 1 To iMonthsInYear             Console.Write(myCal.IsLeapMonth(y, m, JulianCalendar.CurrentEra))          Next m       Next y    End Sub End Class