| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GregorianCalendar ClassSystem.Globalization Namespace Represents the Gregorian calendar.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Visibility | Name | Value Type | Accessibility |
|---|---|---|---|
| public | AlgorithmType | CalendarAlgorithmType | [ Get ] |
| public | CalendarType | GregorianCalendarTypes | [ Get , Set ] |
| public | Eras | Int32 | [ Get ] |
| public | MaxSupportedDateTime | DateTime | [ Get ] |
| public | MinSupportedDateTime | DateTime | [ Get ] |
| public | TwoDigitYearMax | Int32 | [ Get , Set ] |
| Visibility | Name | Parameters | Return Type |
|---|---|---|---|
| public | AddMonths | ( DateTime time , Int32 months ) | DateTime |
| public | AddYears | ( DateTime time , Int32 years ) | DateTime |
| public | GetDayOfMonth | ( DateTime time ) | Int32 |
| public | GetDayOfWeek | ( DateTime time ) | DayOfWeek |
| public | GetDayOfYear | ( DateTime time ) | Int32 |
| public | GetDaysInMonth | ( Int32 year , Int32 month , Int32 era ) | Int32 |
| public | GetDaysInYear | ( Int32 year , Int32 era ) | Int32 |
| public | GetEra | ( DateTime time ) | Int32 |
| public | GetLeapMonth | ( Int32 year , Int32 era ) | Int32 |
| public | GetMonth | ( DateTime time ) | Int32 |
| public | GetMonthsInYear | ( Int32 year , Int32 era ) | Int32 |
| public | GetWeekOfYear | ( DateTime time , CalendarWeekRule rule , DayOfWeek firstDayOfWeek ) | Int32 |
| public | GetYear | ( DateTime time ) | Int32 |
| public | IsLeapDay | ( Int32 year , Int32 month , Int32 day , Int32 era ) | Boolean |
| public | IsLeapMonth | ( Int32 year , Int32 month , Int32 era ) | Boolean |
| public | IsLeapYear | ( Int32 year , Int32 era ) | Boolean |
| public | ToDateTime | ( Int32 year , Int32 month , Int32 day , Int32 hour , Int32 minute , Int32 second , Int32 millisecond , Int32 era ) | DateTime |
| public | ToFourDigitYear | ( Int32 year ) | Int32 |
The Gregorian calendar recognizes two eras: B.C. ( before Christ ) or B.C.E. ( before common era ), and A.D. ( Latin "Anno Domini", which means "in the year of the Lord" ) or C.E. ( common era ). This implementation of the GregorianCalendar class recognizes only the current era ( A.D. or C.E. ).
A leap year in the Gregorian calendar is defined as a year that is evenly divisible by four, except if it is divisible by 100; however, years that are divisible by 400 are leap years. For example, the year 1900 was not a leap year, but the year 2000 was. A common year has 365 days and a leap year has 366 days.
The Gregorian calendar has 12 months with 28 to 31 days each: January ( 31 days ), February ( 28 or 29 days ), March ( 31 days ), April ( 30 days ), May ( 31 days ), June ( 30 days ), July ( 31 days ), August ( 31 days ), September ( 30 days ), October ( 31 days ), November ( 30 days ), and December ( 31 days ). February has 29 days during leap years and 28 during common years.
If the GregorianCalendar is selected in DateTimeFormatInfo.Calendar, DateTimeFormatInfo ignores punctuation in abbreviated era names; that is, "A.D." is equivalent to "AD".
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme