mscorlib(4.0.0.0) API with additions
|
Represents time in divisions, such as weeks, months, and years. More...
Public Member Functions | |
virtual object | Clone () |
Creates a new object that is a copy of the current T:System.Globalization.Calendar object. More... | |
virtual DateTime | AddMilliseconds (DateTime time, double milliseconds) |
Returns a T:System.DateTime that is the specified number of milliseconds away from the specified T:System.DateTime. More... | |
virtual DateTime | AddDays (DateTime time, int days) |
Returns a T:System.DateTime that is the specified number of days away from the specified T:System.DateTime. More... | |
virtual DateTime | AddHours (DateTime time, int hours) |
Returns a T:System.DateTime that is the specified number of hours away from the specified T:System.DateTime. More... | |
virtual DateTime | AddMinutes (DateTime time, int minutes) |
Returns a T:System.DateTime that is the specified number of minutes away from the specified T:System.DateTime. More... | |
abstract DateTime | AddMonths (DateTime time, int months) |
When overridden in a derived class, returns a T:System.DateTime that is the specified number of months away from the specified T:System.DateTime. More... | |
virtual DateTime | AddSeconds (DateTime time, int seconds) |
Returns a T:System.DateTime that is the specified number of seconds away from the specified T:System.DateTime. More... | |
virtual DateTime | AddWeeks (DateTime time, int weeks) |
Returns a T:System.DateTime that is the specified number of weeks away from the specified T:System.DateTime. More... | |
abstract DateTime | AddYears (DateTime time, int years) |
When overridden in a derived class, returns a T:System.DateTime that is the specified number of years away from the specified T:System.DateTime. More... | |
abstract int | GetDayOfMonth (DateTime time) |
When overridden in a derived class, returns the day of the month in the specified T:System.DateTime. More... | |
abstract DayOfWeek | GetDayOfWeek (DateTime time) |
When overridden in a derived class, returns the day of the week in the specified T:System.DateTime. More... | |
abstract int | GetDayOfYear (DateTime time) |
When overridden in a derived class, returns the day of the year in the specified T:System.DateTime. More... | |
virtual int | GetDaysInMonth (int year, int month) |
Returns the number of days in the specified month and year of the current era. More... | |
abstract int | GetDaysInMonth (int year, int month, int era) |
When overridden in a derived class, returns the number of days in the specified month, year, and era. More... | |
virtual int | GetDaysInYear (int year) |
Returns the number of days in the specified year of the current era. More... | |
abstract int | GetDaysInYear (int year, int era) |
When overridden in a derived class, returns the number of days in the specified year and era. More... | |
abstract int | GetEra (DateTime time) |
When overridden in a derived class, returns the era in the specified T:System.DateTime. More... | |
virtual int | GetHour (DateTime time) |
Returns the hours value in the specified T:System.DateTime. More... | |
virtual double | GetMilliseconds (DateTime time) |
Returns the milliseconds value in the specified T:System.DateTime. More... | |
virtual int | GetMinute (DateTime time) |
Returns the minutes value in the specified T:System.DateTime. More... | |
abstract int | GetMonth (DateTime time) |
When overridden in a derived class, returns the month in the specified T:System.DateTime. More... | |
virtual int | GetMonthsInYear (int year) |
Returns the number of months in the specified year in the current era. More... | |
abstract int | GetMonthsInYear (int year, int era) |
When overridden in a derived class, returns the number of months in the specified year in the specified era. More... | |
virtual int | GetSecond (DateTime time) |
Returns the seconds value in the specified T:System.DateTime. More... | |
virtual int | GetWeekOfYear (DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek) |
Returns the week of the year that includes the date in the specified T:System.DateTime value. More... | |
abstract int | GetYear (DateTime time) |
When overridden in a derived class, returns the year in the specified T:System.DateTime. More... | |
virtual bool | IsLeapDay (int year, int month, int day) |
Determines whether the specified date in the current era is a leap day. More... | |
abstract bool | IsLeapDay (int year, int month, int day, int era) |
When overridden in a derived class, determines whether the specified date in the specified era is a leap day. More... | |
virtual bool | IsLeapMonth (int year, int month) |
Determines whether the specified month in the specified year in the current era is a leap month. More... | |
abstract bool | IsLeapMonth (int year, int month, int era) |
When overridden in a derived class, determines whether the specified month in the specified year in the specified era is a leap month. More... | |
virtual int | GetLeapMonth (int year) |
Calculates the leap month for a specified year. More... | |
virtual int | GetLeapMonth (int year, int era) |
Calculates the leap month for a specified year and era. More... | |
virtual bool | IsLeapYear (int year) |
Determines whether the specified year in the current era is a leap year. More... | |
abstract bool | IsLeapYear (int year, int era) |
When overridden in a derived class, determines whether the specified year in the specified era is a leap year. More... | |
virtual DateTime | ToDateTime (int year, int month, int day, int hour, int minute, int second, int millisecond) |
Returns a T:System.DateTime that is set to the specified date and time in the current era. More... | |
abstract DateTime | ToDateTime (int year, int month, int day, int hour, int minute, int second, int millisecond, int era) |
When overridden in a derived class, returns a T:System.DateTime that is set to the specified date and time in the specified era. More... | |
virtual int | ToFourDigitYear (int year) |
Converts the specified year to a four-digit year by using the P:System.Globalization.Calendar.TwoDigitYearMax property to determine the appropriate century. More... | |
Static Public Member Functions | |
static Calendar | ReadOnly (Calendar calendar) |
Returns a read-only version of the specified T:System.Globalization.Calendar object. More... | |
Public Attributes | |
const int | CurrentEra = 0 |
Represents the current era of the current calendar. More... | |
Protected Member Functions | |
Calendar () | |
Initializes a new instance of the T:System.Globalization.Calendar class. More... | |
Protected Attributes | |
virtual int | DaysInYearBeforeMinSupportedYear => 365 |
Gets the number of days in the year that precedes the year that is specified by the P:System.Globalization.Calendar.MinSupportedDateTime property. More... | |
Properties | |
virtual DateTime | MinSupportedDateTime [get] |
Gets the earliest date and time supported by this T:System.Globalization.Calendar object. More... | |
virtual DateTime | MaxSupportedDateTime [get] |
Gets the latest date and time supported by this T:System.Globalization.Calendar object. More... | |
virtual CalendarAlgorithmType | AlgorithmType [get] |
Gets a value indicating whether the current calendar is solar-based, lunar-based, or a combination of both. More... | |
bool | IsReadOnly [get] |
Gets a value indicating whether this T:System.Globalization.Calendar object is read-only. More... | |
abstract int [] | Eras [get] |
When overridden in a derived class, gets the list of eras in the current calendar. More... | |
virtual int | TwoDigitYearMax [get, set] |
Gets or sets the last year of a 100-year range that can be represented by a 2-digit year. More... | |
Represents time in divisions, such as weeks, months, and years.
Definition at line 11 of file Calendar.cs.
|
protected |
Initializes a new instance of the T:System.Globalization.Calendar class.
Definition at line 201 of file Calendar.cs.
Returns a T:System.DateTime that is the specified number of days away from the specified T:System.DateTime.
time | The T:System.DateTime to which to add days. |
days | The number of days to add. |
T:System.ArgumentException | The resulting T:System.DateTime is outside the supported range of this calendar. |
T:System.ArgumentOutOfRangeException | days is outside the supported range of the T:System.DateTime return value. |
Definition at line 291 of file Calendar.cs.
Returns a T:System.DateTime that is the specified number of hours away from the specified T:System.DateTime.
time | The T:System.DateTime to which to add hours. |
hours | The number of hours to add. |
T:System.ArgumentException | The resulting T:System.DateTime is outside the supported range of this calendar. |
T:System.ArgumentOutOfRangeException | hours is outside the supported range of the T:System.DateTime return value. |
Definition at line 304 of file Calendar.cs.
|
virtual |
Returns a T:System.DateTime that is the specified number of milliseconds away from the specified T:System.DateTime.
time | The T:System.DateTime to add milliseconds to. |
milliseconds | The number of milliseconds to add. |
T:System.ArgumentException | The resulting T:System.DateTime is outside the supported range of this calendar. |
T:System.ArgumentOutOfRangeException | milliseconds is outside the supported range of the T:System.DateTime return value. |
Definition at line 278 of file Calendar.cs.
Returns a T:System.DateTime that is the specified number of minutes away from the specified T:System.DateTime.
time | The T:System.DateTime to which to add minutes. |
minutes | The number of minutes to add. |
T:System.ArgumentException | The resulting T:System.DateTime is outside the supported range of this calendar. |
T:System.ArgumentOutOfRangeException | minutes is outside the supported range of the T:System.DateTime return value. |
Definition at line 317 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, returns a T:System.DateTime that is the specified number of months away from the specified T:System.DateTime.
time | The T:System.DateTime to which to add months. |
months | The number of months to add. |
T:System.ArgumentException | The resulting T:System.DateTime is outside the supported range of this calendar. |
T:System.ArgumentOutOfRangeException | months is outside the supported range of the T:System.DateTime return value. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
Returns a T:System.DateTime that is the specified number of seconds away from the specified T:System.DateTime.
time | The T:System.DateTime to which to add seconds. |
seconds | The number of seconds to add. |
T:System.ArgumentException | The resulting T:System.DateTime is outside the supported range of this calendar. |
T:System.ArgumentOutOfRangeException | seconds is outside the supported range of the T:System.DateTime return value. |
Definition at line 340 of file Calendar.cs.
Returns a T:System.DateTime that is the specified number of weeks away from the specified T:System.DateTime.
time | The T:System.DateTime to which to add weeks. |
weeks | The number of weeks to add. |
T:System.ArgumentException | The resulting T:System.DateTime is outside the supported range of this calendar. |
T:System.ArgumentOutOfRangeException | weeks is outside the supported range of the T:System.DateTime return value. |
Definition at line 353 of file Calendar.cs.
When overridden in a derived class, returns a T:System.DateTime that is the specified number of years away from the specified T:System.DateTime.
time | The T:System.DateTime to which to add years. |
years | The number of years to add. |
T:System.ArgumentException | The resulting T:System.DateTime is outside the supported range of this calendar. |
T:System.ArgumentOutOfRangeException | years is outside the supported range of the T:System.DateTime return value. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JulianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.PersianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
virtual |
Creates a new object that is a copy of the current T:System.Globalization.Calendar object.
Implements System.ICloneable.
Definition at line 208 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, returns the day of the month in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
When overridden in a derived class, returns the day of the week in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
pure virtual |
When overridden in a derived class, returns the day of the year in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
virtual |
Returns the number of days in the specified month and year of the current era.
year | An integer that represents the year. |
month | A positive integer that represents the month. |
T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- month is outside the range supported by the calendar. |
Definition at line 394 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, returns the number of days in the specified month, year, and era.
year | An integer that represents the year. |
month | A positive integer that represents the month. |
era | An integer that represents the era. |
T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- month is outside the range supported by the calendar.-or- era is outside the range supported by the calendar. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JulianCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.PersianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
virtual |
Returns the number of days in the specified year of the current era.
year | An integer that represents the year. |
T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar. |
Definition at line 417 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, returns the number of days in the specified year and era.
year | An integer that represents the year. |
era | An integer that represents the era. |
T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- era is outside the range supported by the calendar. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
pure virtual |
When overridden in a derived class, returns the era in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implemented in System.Globalization.KoreanLunisolarCalendar, System.Globalization.HebrewCalendar, System.Globalization.ChineseLunisolarCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.TaiwanLunisolarCalendar, System.Globalization.JapaneseLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
virtual |
Returns the hours value in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Definition at line 442 of file Calendar.cs.
|
virtual |
Calculates the leap month for a specified year.
year | A year. |
Definition at line 647 of file Calendar.cs.
|
virtual |
Calculates the leap month for a specified year and era.
year | A year. |
era | An era. |
Reimplemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
Definition at line 658 of file Calendar.cs.
|
virtual |
Returns the milliseconds value in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Definition at line 451 of file Calendar.cs.
|
virtual |
Returns the minutes value in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Definition at line 460 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, returns the month in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
virtual |
Returns the number of months in the specified year in the current era.
year | An integer that represents the year. |
T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar. |
Definition at line 477 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, returns the number of months in the specified year in the specified era.
year | An integer that represents the year. |
era | An integer that represents the era. |
T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- era is outside the range supported by the calendar. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
virtual |
Returns the seconds value in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Definition at line 496 of file Calendar.cs.
|
virtual |
Returns the week of the year that includes the date in the specified T:System.DateTime value.
time | A date and time value. |
rule | An enumeration value that defines a calendar week. |
firstDayOfWeek | An enumeration value that represents the first day of the week. |
T:System.ArgumentOutOfRangeException | time is earlier than P:System.Globalization.Calendar.MinSupportedDateTime or later than P:System.Globalization.Calendar.MaxSupportedDateTime.-or- firstDayOfWeek is not a valid T:System.DayOfWeek value.-or- rule is not a valid T:System.Globalization.CalendarWeekRule value. |
Reimplemented in System.Globalization.JapaneseCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
Definition at line 560 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, returns the year in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.PersianCalendar, System.Globalization.JulianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
virtual |
Determines whether the specified date in the current era is a leap day.
year | An integer that represents the year. |
month | A positive integer that represents the month. |
day | A positive integer that represents the day. |
true
if the specified day is a leap day; otherwise, false
.T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- month is outside the range supported by the calendar.-or- day is outside the range supported by the calendar. |
Definition at line 596 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, determines whether the specified date in the specified era is a leap day.
year | An integer that represents the year. |
month | A positive integer that represents the month. |
day | A positive integer that represents the day. |
era | An integer that represents the era. |
true
if the specified day is a leap day; otherwise, false
.T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- month is outside the range supported by the calendar.-or- day is outside the range supported by the calendar.-or- era is outside the range supported by the calendar. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
virtual |
Determines whether the specified month in the specified year in the current era is a leap month.
year | An integer that represents the year. |
month | A positive integer that represents the month. |
true
if the specified month is a leap month; otherwise, false
.T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- month is outside the range supported by the calendar. |
Definition at line 625 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, determines whether the specified month in the specified year in the specified era is a leap month.
year | An integer that represents the year. |
month | A positive integer that represents the month. |
era | An integer that represents the era. |
true
if the specified month is a leap month; otherwise, false
.T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- month is outside the range supported by the calendar.-or- era is outside the range supported by the calendar. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
virtual |
Determines whether the specified year in the current era is a leap year.
year | An integer that represents the year. |
true
if the specified year is a leap year; otherwise, false
.T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar. |
Definition at line 682 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, determines whether the specified year in the specified era is a leap year.
year | An integer that represents the year. |
era | An integer that represents the era. |
true
if the specified year is a leap year; otherwise, false
.T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- era is outside the range supported by the calendar. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
Returns a read-only version of the specified T:System.Globalization.Calendar object.
calendar | A T:System.Globalization.Calendar object. |
T:System.ArgumentNullException | calendar is null . |
Definition at line 221 of file Calendar.cs.
|
virtual |
Returns a T:System.DateTime that is set to the specified date and time in the current era.
year | An integer that represents the year. |
month | A positive integer that represents the month. |
day | A positive integer that represents the day. |
hour | An integer from 0 to 23 that represents the hour. |
minute | An integer from 0 to 59 that represents the minute. |
second | An integer from 0 to 59 that represents the second. |
millisecond | An integer from 0 to 999 that represents the millisecond. |
T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- month is outside the range supported by the calendar.-or- day is outside the range supported by the calendar.-or- hour is less than zero or greater than 23.-or- minute is less than zero or greater than 59.-or- second is less than zero or greater than 59.-or- millisecond is less than zero or greater than 999. |
Definition at line 716 of file Calendar.cs.
|
pure virtual |
When overridden in a derived class, returns a T:System.DateTime that is set to the specified date and time in the specified era.
year | An integer that represents the year. |
month | A positive integer that represents the month. |
day | A positive integer that represents the day. |
hour | An integer from 0 to 23 that represents the hour. |
minute | An integer from 0 to 59 that represents the minute. |
second | An integer from 0 to 59 that represents the second. |
millisecond | An integer from 0 to 999 that represents the millisecond. |
era | An integer that represents the era. |
T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar.-or- month is outside the range supported by the calendar.-or- day is outside the range supported by the calendar.-or- hour is less than zero or greater than 23.-or- minute is less than zero or greater than 59.-or- second is less than zero or greater than 59.-or- millisecond is less than zero or greater than 999.-or- era is outside the range supported by the calendar. |
Implemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
|
virtual |
Converts the specified year to a four-digit year by using the P:System.Globalization.Calendar.TwoDigitYearMax property to determine the appropriate century.
year | A two-digit or four-digit integer that represents the year to convert. |
T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar. |
Reimplemented in System.Globalization.HebrewCalendar, System.Globalization.UmAlQuraCalendar, System.Globalization.EastAsianLunisolarCalendar, System.Globalization.HijriCalendar, System.Globalization.GregorianCalendar, System.Globalization.JulianCalendar, System.Globalization.PersianCalendar, System.Globalization.JapaneseCalendar, System.Globalization.TaiwanCalendar, System.Globalization.KoreanCalendar, and System.Globalization.ThaiBuddhistCalendar.
Definition at line 790 of file Calendar.cs.
const int System.Globalization.Calendar.CurrentEra = 0 |
Represents the current era of the current calendar.
Definition at line 96 of file Calendar.cs.
|
protected |
Gets the number of days in the year that precedes the year that is specified by the P:System.Globalization.Calendar.MinSupportedDateTime property.
Definition at line 178 of file Calendar.cs.
|
get |
Gets a value indicating whether the current calendar is solar-based, lunar-based, or a combination of both.
Definition at line 134 of file Calendar.cs.
|
get |
When overridden in a derived class, gets the list of eras in the current calendar.
Definition at line 171 of file Calendar.cs.
|
get |
Gets a value indicating whether this T:System.Globalization.Calendar object is read-only.
true
if this T:System.Globalization.Calendar object is read-only; otherwise, false
.Definition at line 147 of file Calendar.cs.
|
get |
Gets the latest date and time supported by this T:System.Globalization.Calendar object.
Definition at line 118 of file Calendar.cs.
|
get |
Gets the earliest date and time supported by this T:System.Globalization.Calendar object.
Definition at line 105 of file Calendar.cs.
|
getset |
Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.
T:System.InvalidOperationException | The current T:System.Globalization.Calendar object is read-only. |
Definition at line 185 of file Calendar.cs.