mscorlib(4.0.0.0) API with additions
System.Globalization.TaiwanCalendar Class Reference

the Taiwan calendar. More...

Inheritance diagram for System.Globalization.TaiwanCalendar:
[legend]
Collaboration diagram for System.Globalization.TaiwanCalendar:
[legend]

Public Member Functions

 TaiwanCalendar ()
 Initializes a new instance of the T:System.Globalization.TaiwanCalendar 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.TaiwanCalendar.TwoDigitYearMax property to determine the appropriate century. More...
 
- Public Member Functions inherited from System.Globalization.Calendar
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.TaiwanCalendar. More...
 
- Public Attributes inherited from System.Globalization.Calendar
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 T:System.Globalization.TaiwanCalendar class. More...
 
override DateTime MaxSupportedDateTime [get]
 Gets the latest date and time supported by the T:System.Globalization.TaiwanCalendar class. 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...
 
- Properties inherited from System.Globalization.Calendar
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 Public Member Functions inherited from System.Globalization.Calendar
static Calendar ReadOnly (Calendar calendar)
 Returns a read-only version of the specified T:System.Globalization.Calendar object. More...
 
- Protected Member Functions inherited from System.Globalization.Calendar
 Calendar ()
 Initializes a new instance of the T:System.Globalization.Calendar class. More...
 
- Protected Attributes inherited from System.Globalization.Calendar
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...
 

Detailed Description

the Taiwan calendar.

Definition at line 8 of file TaiwanCalendar.cs.

Constructor & Destructor Documentation

◆ TaiwanCalendar()

System.Globalization.TaiwanCalendar.TaiwanCalendar ( )

Initializes a new instance of the T:System.Globalization.TaiwanCalendar class.

Exceptions
T:System.TypeInitializationExceptionUnable to initialize a T:System.Globalization.TaiwanCalendar object because of missing culture information.

Definition at line 98 of file TaiwanCalendar.cs.

Member Function Documentation

◆ AddMonths()

override DateTime System.Globalization.TaiwanCalendar.AddMonths ( DateTime  time,
int  months 
)
virtual

Returns a T:System.DateTime that is the specified number of months away from the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to which to add months.
monthsThe number of months to add.
Returns
The T:System.DateTime that results from adding the specified number of months to the specified T:System.DateTime.
Exceptions
T:System.ArgumentExceptionThe resulting T:System.DateTime is outside the supported range.
T:System.ArgumentOutOfRangeExceptionmonths is less than -120000.-or- months is greater than 120000.

Implements System.Globalization.Calendar.

Definition at line 119 of file TaiwanCalendar.cs.

◆ AddYears()

override DateTime System.Globalization.TaiwanCalendar.AddYears ( DateTime  time,
int  years 
)
virtual

Returns a T:System.DateTime that is the specified number of years away from the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to which to add years.
yearsThe number of years to add.
Returns
The T:System.DateTime that results from adding the specified number of years to the specified T:System.DateTime.
Exceptions
T:System.ArgumentExceptionThe resulting T:System.DateTime is outside the supported range.

Implements System.Globalization.Calendar.

Definition at line 129 of file TaiwanCalendar.cs.

◆ GetDayOfMonth()

override int System.Globalization.TaiwanCalendar.GetDayOfMonth ( DateTime  time)
virtual

Returns the day of the month in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
An integer from 1 to 31 that represents the day of the month in the specified T:System.DateTime.

Implements System.Globalization.Calendar.

Definition at line 163 of file TaiwanCalendar.cs.

◆ GetDayOfWeek()

override DayOfWeek System.Globalization.TaiwanCalendar.GetDayOfWeek ( DateTime  time)
virtual

Returns the day of the week in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
A T:System.DayOfWeek value that represents the day of the week in the specified T:System.DateTime.

Implements System.Globalization.Calendar.

Definition at line 171 of file TaiwanCalendar.cs.

◆ GetDayOfYear()

override int System.Globalization.TaiwanCalendar.GetDayOfYear ( DateTime  time)
virtual

Returns the day of the year in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
An integer from 1 to 366 that represents the day of the year in the specified T:System.DateTime.

Implements System.Globalization.Calendar.

Definition at line 179 of file TaiwanCalendar.cs.

◆ GetDaysInMonth()

override int System.Globalization.TaiwanCalendar.GetDaysInMonth ( int  year,
int  month,
int  era 
)
virtual

Returns the number of days in the specified month in the specified year in the specified era.

Parameters
yearAn integer that represents the year.
monthAn integer from 1 to 12 that represents the month.
eraAn integer that represents the era.
Returns
The number of days in the specified month in the specified year in the specified era.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear 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 143 of file TaiwanCalendar.cs.

◆ GetDaysInYear()

override int System.Globalization.TaiwanCalendar.GetDaysInYear ( int  year,
int  era 
)
virtual

Returns the number of days in the specified year in the specified era.

Parameters
yearAn integer that represents the year.
eraAn integer that represents the era.
Returns
The number of days in the specified year in the specified era.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear 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 155 of file TaiwanCalendar.cs.

◆ GetEra()

override int System.Globalization.TaiwanCalendar.GetEra ( DateTime  time)
virtual

Returns the era in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
An integer that represents the era in the specified T:System.DateTime.

Implements System.Globalization.Calendar.

Definition at line 213 of file TaiwanCalendar.cs.

◆ GetLeapMonth()

override int System.Globalization.TaiwanCalendar.GetLeapMonth ( int  year,
int  era 
)
virtual

Calculates the leap month for a specified year and era.

Parameters
yearA year.
eraAn era.
Returns
The return value is always 0 because the T:System.Globalization.TaiwanCalendar class does not support the notion of a leap month.

Reimplemented from System.Globalization.Calendar.

Definition at line 269 of file TaiwanCalendar.cs.

◆ GetMonth()

override int System.Globalization.TaiwanCalendar.GetMonth ( DateTime  time)
virtual

Returns the month in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
An integer from 1 to 12 that represents the month in the specified T:System.DateTime.

Implements System.Globalization.Calendar.

Definition at line 221 of file TaiwanCalendar.cs.

◆ GetMonthsInYear()

override int System.Globalization.TaiwanCalendar.GetMonthsInYear ( int  year,
int  era 
)
virtual

Returns the number of months in the specified year in the specified era.

Parameters
yearAn integer that represents the year.
eraAn integer that represents the era.
Returns
The number of months in the specified year in the specified era.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear 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 191 of file TaiwanCalendar.cs.

◆ GetWeekOfYear()

override int System.Globalization.TaiwanCalendar.GetWeekOfYear ( DateTime  time,
CalendarWeekRule  rule,
DayOfWeek  firstDayOfWeek 
)
virtual

Returns the week of the year that includes the date in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
ruleOne of the T:System.Globalization.CalendarWeekRule values that defines a calendar week.
firstDayOfWeekOne of the T:System.DayOfWeek values that represents the first day of the week.
Returns
A positive integer that represents the week of the year that includes the date in the time parameter.
Exceptions
T:System.ArgumentOutOfRangeExceptiontime 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 205 of file TaiwanCalendar.cs.

◆ GetYear()

override int System.Globalization.TaiwanCalendar.GetYear ( DateTime  time)
virtual

Returns the year in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
An integer that represents the year in the specified T:System.DateTime.

Implements System.Globalization.Calendar.

Definition at line 229 of file TaiwanCalendar.cs.

◆ IsLeapDay()

override bool System.Globalization.TaiwanCalendar.IsLeapDay ( int  year,
int  month,
int  day,
int  era 
)
virtual

Determines whether the specified date in the specified era is a leap day.

Parameters
yearAn integer that represents the year.
monthAn integer from 1 to 12 that represents the month.
dayAn integer from 1 to 31 that represents the day.
eraAn integer that represents the era.
Returns
true if the specified day is a leap day; otherwise, false.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear 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 246 of file TaiwanCalendar.cs.

◆ IsLeapMonth()

override bool System.Globalization.TaiwanCalendar.IsLeapMonth ( int  year,
int  month,
int  era 
)
virtual

Determines whether the specified month in the specified year in the specified era is a leap month.

Parameters
yearAn integer that represents the year.
monthAn integer from 1 to 12 that represents the month.
eraAn integer that represents the era.
Returns
This method always returns false, unless overridden by a derived class.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear 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 283 of file TaiwanCalendar.cs.

◆ IsLeapYear()

override bool System.Globalization.TaiwanCalendar.IsLeapYear ( int  year,
int  era 
)
virtual

Determines whether the specified year in the specified era is a leap year.

Parameters
yearAn integer that represents the year.
eraAn integer that represents the era.
Returns
true if the specified year is a leap year; otherwise, false.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear 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 259 of file TaiwanCalendar.cs.

◆ ToDateTime()

override DateTime System.Globalization.TaiwanCalendar.ToDateTime ( int  year,
int  month,
int  day,
int  hour,
int  minute,
int  second,
int  millisecond,
int  era 
)
virtual

Returns a T:System.DateTime that is set to the specified date and time in the specified era.

Parameters
yearAn integer that represents the year.
monthAn integer from 1 to 12 that represents the month.
dayAn integer from 1 to 31 that represents the day.
hourAn integer from 0 to 23 that represents the hour.
minuteAn integer from 0 to 59 that represents the minute.
secondAn integer from 0 to 59 that represents the second.
millisecondAn integer from 0 to 999 that represents the millisecond.
eraAn integer that represents the era.
Returns
The T:System.DateTime that is set to the specified date and time in the current era.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear 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 307 of file TaiwanCalendar.cs.

◆ ToFourDigitYear()

override int System.Globalization.TaiwanCalendar.ToFourDigitYear ( int  year)
virtual

Converts the specified year to a four-digit year by using the P:System.Globalization.TaiwanCalendar.TwoDigitYearMax property to determine the appropriate century.

Parameters
yearA two-digit or four-digit integer that represents the year to convert.
Returns
An integer that contains the four-digit representation of year .
Exceptions
T:System.ArgumentOutOfRangeExceptionyear is outside the range supported by the calendar.

Reimplemented from System.Globalization.Calendar.

Definition at line 317 of file TaiwanCalendar.cs.

Member Data Documentation

◆ Eras

override int [] System.Globalization.TaiwanCalendar.Eras => helper.Eras

Gets the list of eras in the T:System.Globalization.TaiwanCalendar.

Returns
An array that consists of a single element for which the value is always the current era.

Definition at line 60 of file TaiwanCalendar.cs.

Property Documentation

◆ AlgorithmType

override CalendarAlgorithmType System.Globalization.TaiwanCalendar.AlgorithmType
get

Gets a value that indicates whether the current calendar is solar-based, lunar-based, or a combination of both.

Returns
Always returns F:System.Globalization.CalendarAlgorithmType.SolarCalendar.

Definition at line 49 of file TaiwanCalendar.cs.

◆ MaxSupportedDateTime

override DateTime System.Globalization.TaiwanCalendar.MaxSupportedDateTime
get

Gets the latest date and time supported by the T:System.Globalization.TaiwanCalendar class.

Returns
The latest date and time supported by the T:System.Globalization.TaiwanCalendar class, which is equivalent to the last moment of December 31, 9999 C.E. in the Gregorian calendar.

Definition at line 38 of file TaiwanCalendar.cs.

◆ MinSupportedDateTime

override DateTime System.Globalization.TaiwanCalendar.MinSupportedDateTime
get

Gets the earliest date and time supported by the T:System.Globalization.TaiwanCalendar class.

Returns
The earliest date and time supported by the T:System.Globalization.TaiwanCalendar class, which is equivalent to the first moment of January 1, 1912 C.E. in the Gregorian calendar.

Definition at line 27 of file TaiwanCalendar.cs.

◆ TwoDigitYearMax

override int System.Globalization.TaiwanCalendar.TwoDigitYearMax
getset

Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.

Returns
The last year of a 100-year range that can be represented by a 2-digit year.
Exceptions
T:System.ArgumentOutOfRangeExceptionThe value specified in a set operation is less than 99. -or- The value specified in a set operation is greater than MaxSupportedDateTime.Year.
T:System.InvalidOperationExceptionIn a set operation, the current instance is read-only.

Definition at line 67 of file TaiwanCalendar.cs.


The documentation for this class was generated from the following file: