GregorianCalendar

GregorianCalendar


Provides methods for manipulating dates using the Gregorian calendar mathematics.

Remarks

The Gregorian calendar recognizes an era of BC (Before Christ) and AD (Anno Domino). The GregorianCalendar class only support the AD era (1).

The calendar supports the time from 01/01/0001 12:00:00AM to 12/31/9999 11:59:59PM.

Only leap year is recognized and occurs every 4 years, except a year that is evenly divisible by 100. However, if it is divisible by 400 then it is a leap year.

There are 12 months in the Gregorian calendar. The number of days range from 28 to 31, except on leap year when the shortest month is 29 days.

See Also

Project VBCorLib Overview | Calendar | GregorianCalendarStatic

Implements:

Calendar 
IObject 

Public:

Types:

NameDescription
 GregorianCalendarTypes 

Properties:

NameDescription
 CalendarType (get) Returns the calendar type that represents the language version.  
 CalendarType (let) Sets the calendar type that represents the language version.  
 Eras (get) Returns an array of eras this calendar represents.  
 TwoDigitYearMax (get) Returns the maximum year to be created from a 2-digit year.  
 TwoDigitYearMax (let) Sets the maximum year to be created from a 2-digit year.  

Methods:

NameDescription
 AddDays Adds a number of days to the date provided using Gregorian math.  
 AddHours Adds a number of hours to the date provided.  
 AddMilliseconds Returns a cDateTime this is the specified number of Milliseconds from the original Time.  
 AddMinutes Returns a cDateTime this is the specified number of Minutes from the original Time.  
 AddMonths Returns a cDateTime this is the specified number of Months from the original Time.  
 AddSeconds Returns a cDateTime this is the specified number of Seconds from the original Time.  
 AddWeeks Returns a cDateTime this is the specified number of Weeks from the original Time.  
 AddYears Returns a cDateTime this is the specified number of Years from the original Time.  
 Equals Returns a boolean indicating if the value and this object instance are the same instance.  
 GetDayOfMonth Returns the day of the months for the specified date.  
 GetDayOfWeek Returns the DayOfWeek enum of the specified date.  
 GetDayOfYear Returns the day of the year for the specified date.  
 GetDaysInMonth Returns the number of days in the specified month.  
 GetDaysInYear Returns the number of days in the specified year.  
 GetEra Returns the era that the specified time exists in.  
 GetHashCode Returns a pseudo-unique number identifying this instance.  
 GetHour Returns the hour of the specified time.  
 GetMilliseconds Returns the milliseconds of the specified time.  
 GetMinute Returns the minute of the specified time.  
 GetMonth Returns the month of the specified time.  
 GetMonthsInYear Returns the number of months in the specified year.  
 GetSecond Returns the second of the specified time.  
 GetWeekOfYear Returns the week of the year that the specified date belongs to.  
 GetYear Returns the year of the specified time.  
 IsLeapDay Returns a boolean indicating if the specific day is a leap day.  
 IsLeapMonth Returns a boolean indicating if the specific month is a leap month.  
 IsLeapYear Returns a boolean indicating if the specific year is a leap year.  
 ToDateTime Returns a Gregorian cDateTime computed using the specific calendar rules.  
 ToFourDigitYear Returns a 4-digit year from a 2-digit number.  
 ToString Returns a string representation of this object instance.