mscorlib(4.0.0.0) API with additions
|
Represents the Japanese calendar. More...
Public Member Functions | |
JapaneseCalendar () | |
Initializes a new instance of the T:System.Globalization.JapaneseCalendar class. More... | |
override DateTime | AddMonths (DateTime time, int months) |
Returns a T:System.DateTime that is the specified number of months away from the specified T:System.DateTime. More... | |
override DateTime | AddYears (DateTime time, int years) |
Returns a T:System.DateTime that is the specified number of years away from the specified T:System.DateTime. More... | |
override int | GetDaysInMonth (int year, int month, int era) |
Returns the number of days in the specified month in the specified year in the specified era. More... | |
override int | GetDaysInYear (int year, int era) |
Returns the number of days in the specified year in the specified era. More... | |
override int | GetDayOfMonth (DateTime time) |
Returns the day of the month in the specified T:System.DateTime. More... | |
override DayOfWeek | GetDayOfWeek (DateTime time) |
Returns the day of the week in the specified T:System.DateTime. More... | |
override int | GetDayOfYear (DateTime time) |
Returns the day of the year in the specified T:System.DateTime. More... | |
override int | GetMonthsInYear (int year, int era) |
Returns the number of months in the specified year in the specified era. More... | |
override int | GetWeekOfYear (DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek) |
Returns the week of the year that includes the date in the specified T:System.DateTime. More... | |
override int | GetEra (DateTime time) |
Returns the era in the specified T:System.DateTime. More... | |
override int | GetMonth (DateTime time) |
Returns the month in the specified T:System.DateTime. More... | |
override int | GetYear (DateTime time) |
Returns the year in the specified T:System.DateTime. More... | |
override bool | IsLeapDay (int year, int month, int day, int era) |
Determines whether the specified date in the specified era is a leap day. More... | |
override bool | IsLeapYear (int year, int era) |
Determines whether the specified year in the specified era is a leap year. More... | |
override int | GetLeapMonth (int year, int era) |
Calculates the leap month for a specified year and era. More... | |
override bool | IsLeapMonth (int year, int month, int era) |
Determines whether the specified month in the specified year in the specified era is a leap month. More... | |
override DateTime | ToDateTime (int year, int month, int day, int hour, int minute, int second, int millisecond, int era) |
Returns a T:System.DateTime that is set to the specified date and time in the specified era. More... | |
override int | ToFourDigitYear (int year) |
Converts the specified year to a four-digit year by using the P:System.Globalization.JapaneseCalendar.TwoDigitYearMax property to determine the appropriate century. More... | |
![]() | |
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... | |
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... | |
virtual int | GetDaysInMonth (int year, int month) |
Returns the number of days in the specified month and year of the current era. More... | |
virtual int | GetDaysInYear (int year) |
Returns the number of days in the specified year of the current era. 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... | |
virtual int | GetMonthsInYear (int year) |
Returns the number of months in the specified year in the current era. More... | |
virtual int | GetSecond (DateTime time) |
Returns the seconds value 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... | |
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... | |
virtual int | GetLeapMonth (int year) |
Calculates the leap month for a specified year. More... | |
virtual bool | IsLeapYear (int year) |
Determines whether the specified year in the current 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... | |
Public Attributes | |
override int [] | Eras => helper.Eras |
Gets the list of eras in the T:System.Globalization.JapaneseCalendar. More... | |
![]() | |
const int | CurrentEra = 0 |
Represents the current era of the current calendar. More... | |
Properties | |
override DateTime | MinSupportedDateTime [get] |
Gets the earliest date and time supported by the current T:System.Globalization.JapaneseCalendar object. More... | |
override DateTime | MaxSupportedDateTime [get] |
Gets the latest date and time supported by the current T:System.Globalization.JapaneseCalendar object. More... | |
override CalendarAlgorithmType | AlgorithmType [get] |
Gets a value that indicates whether the current calendar is solar-based, lunar-based, or a combination of both. More... | |
override 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... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
static Calendar | ReadOnly (Calendar calendar) |
Returns a read-only version of the specified T:System.Globalization.Calendar object. More... | |
![]() | |
Calendar () | |
Initializes a new instance of the T:System.Globalization.Calendar class. More... | |
![]() | |
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... | |
Represents the Japanese calendar.
Definition at line 12 of file JapaneseCalendar.cs.
System.Globalization.JapaneseCalendar.JapaneseCalendar | ( | ) |
Initializes a new instance of the T:System.Globalization.JapaneseCalendar class.
T:System.TypeInitializationException | Unable to initialize a T:System.Globalization.JapaneseCalendar object because of missing culture information. |
Definition at line 216 of file JapaneseCalendar.cs.
|
virtual |
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. |
T:System.ArgumentOutOfRangeException | months is less than -120000.-or- months is greater than 120000. |
Implements System.Globalization.Calendar.
Definition at line 237 of file JapaneseCalendar.cs.
|
virtual |
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. |
T:System.ArgumentOutOfRangeException | time is outside the supported range of the T:System.Globalization.JapaneseCalendar type.-or- years is less than -10,000 or greater than 10,000. |
Implements System.Globalization.Calendar.
Definition at line 250 of file JapaneseCalendar.cs.
|
virtual |
Returns the day of the month in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implements System.Globalization.Calendar.
Definition at line 284 of file JapaneseCalendar.cs.
Returns the day of the week in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implements System.Globalization.Calendar.
Definition at line 292 of file JapaneseCalendar.cs.
|
virtual |
Returns the day of the year in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implements System.Globalization.Calendar.
Definition at line 300 of file JapaneseCalendar.cs.
|
virtual |
Returns the number of days in the specified month in the specified year in the specified era.
year | An integer that represents the year. |
month | An integer from 1 to 12 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. |
Implements System.Globalization.Calendar.
Definition at line 264 of file JapaneseCalendar.cs.
|
virtual |
Returns the number of days 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. |
Implements System.Globalization.Calendar.
Definition at line 276 of file JapaneseCalendar.cs.
|
virtual |
Returns the era in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
T:System.ArgumentOutOfRangeException | The resulting T:System.DateTime is outside the supported range. |
Implements System.Globalization.Calendar.
Definition at line 335 of file JapaneseCalendar.cs.
|
virtual |
Calculates the leap month for a specified year and era.
year | A year. |
era | An era. |
T:System.ArgumentOutOfRangeException | year or era is outside the range supported by the T:System.Globalization.JapaneseCalendar type. |
Reimplemented from System.Globalization.Calendar.
Definition at line 393 of file JapaneseCalendar.cs.
|
virtual |
Returns the month in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implements System.Globalization.Calendar.
Definition at line 343 of file JapaneseCalendar.cs.
|
virtual |
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. |
Implements System.Globalization.Calendar.
Definition at line 312 of file JapaneseCalendar.cs.
|
virtual |
Returns the week of the year that includes the date in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
rule | One of the T:System.Globalization.CalendarWeekRule values that defines a calendar week. |
firstDayOfWeek | One of the T:System.DayOfWeek values that represents the first day of the week. |
T:System.ArgumentOutOfRangeException | time or firstDayOfWeek is outside the range supported by the calendar.-or- rule is not a valid T:System.Globalization.CalendarWeekRule value. |
Reimplemented from System.Globalization.Calendar.
Definition at line 326 of file JapaneseCalendar.cs.
|
virtual |
Returns the year in the specified T:System.DateTime.
time | The T:System.DateTime to read. |
Implements System.Globalization.Calendar.
Definition at line 351 of file JapaneseCalendar.cs.
|
virtual |
Determines whether the specified date in the specified era is a leap day.
year | An integer that represents the year. |
month | An integer from 1 to 12 that represents the month. |
day | An integer from 1 to 31 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. |
Implements System.Globalization.Calendar.
Definition at line 368 of file JapaneseCalendar.cs.
|
virtual |
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 | An integer from 1 to 12 that represents the month. |
era | An integer that represents the era. |
false
, unless overridden by a derived class.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. |
Implements System.Globalization.Calendar.
Definition at line 407 of file JapaneseCalendar.cs.
|
virtual |
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. |
Implements System.Globalization.Calendar.
Definition at line 381 of file JapaneseCalendar.cs.
|
virtual |
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 | An integer from 1 to 12 that represents the month. |
day | An integer from 1 to 31 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. |
Implements System.Globalization.Calendar.
Definition at line 431 of file JapaneseCalendar.cs.
|
virtual |
Converts the specified year to a four-digit year by using the P:System.Globalization.JapaneseCalendar.TwoDigitYearMax property to determine the appropriate century.
year | An integer (usually two digits) that represents the year to convert. |
T:System.ArgumentOutOfRangeException | year is outside the range supported by the calendar. |
Reimplemented from System.Globalization.Calendar.
Definition at line 441 of file JapaneseCalendar.cs.
override int [] System.Globalization.JapaneseCalendar.Eras => helper.Eras |
Gets the list of eras in the T:System.Globalization.JapaneseCalendar.
Definition at line 65 of file JapaneseCalendar.cs.
|
get |
Gets a value that indicates whether the current calendar is solar-based, lunar-based, or a combination of both.
Definition at line 54 of file JapaneseCalendar.cs.
|
get |
Gets the latest date and time supported by the current T:System.Globalization.JapaneseCalendar object.
Definition at line 43 of file JapaneseCalendar.cs.
|
get |
Gets the earliest date and time supported by the current T:System.Globalization.JapaneseCalendar object.
Definition at line 32 of file JapaneseCalendar.cs.
|
getset |
Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.
T:System.ArgumentOutOfRangeException | The value specified in a set operation is less than 99. -or- The value specified in a set operation is greater than 8011 (or MaxSupportedDateTime.Year ). |
T:System.InvalidOperationException | In a set operation, the current instance is read-only. |
Definition at line 72 of file JapaneseCalendar.cs.