Mega Code Archive

 
Categories / VB.Net / Date Time
 

Returns the number of days in the specified month and year

Imports System.Globalization Module MainClass    Public Sub Main()         Const July As Integer = 7         Const Feb As Integer = 2         Dim daysInJuly As Integer = System.DateTime.DaysInMonth(2001, July)                  Dim daysInFeb As Integer = System.DateTime.DaysInMonth(1998, Feb)                  Dim daysInFebLeap As Integer = System.DateTime.DaysInMonth(1996, Feb)             End Sub End Module