GregorianCalendar.MaxSupportedDateTime : GregorianCalendar « Development « VB.Net






GregorianCalendar.MaxSupportedDateTime

 

Imports System
Imports System.Globalization

Public Class SamplesCalendar   

   Public Shared Sub Main()

      ' Create an instance of the calendar.
      Dim myCal As New GregorianCalendar()
      Console.WriteLine(myCal.ToString())

      ' Display the MinSupportedDateTime.
      Dim myMin As DateTime = myCal.MinSupportedDateTime
      Console.WriteLine("MinSupportedDateTime: {0:D2}/{1:D2}/{2:D4}", myCal.GetMonth(myMin), myCal.GetDayOfMonth(myMin), myCal.GetYear(myMin))

      ' Display the MaxSupportedDateTime.
      Dim myMax As DateTime = myCal.MaxSupportedDateTime
      Console.WriteLine("MaxSupportedDateTime: {0:D2}/{1:D2}/{2:D4}", myCal.GetMonth(myMax), myCal.GetDayOfMonth(myMax), myCal.GetYear(myMax))

   End Sub 'Main 

End Class 'SamplesCalendar

   
  








Related examples in the same category

1.GregorianCalendar.GetDaysInMonth
2.GregorianCalendar.GetDaysInYear
3.GregorianCalendar.GetMonthsInYear
4.GregorianCalendar.GetWeekOfYear
5.GregorianCalendar.IsLeapDay
6.GregorianCalendar.IsLeapMonth
7.GregorianCalendar.IsLeapYear determines whether the specified year in the specified era is a leap year.
8.GregorianCalendarTypes Enumeration defines the different language versions of the Gregorian calendar.