UmAlQuraCalendar::GetYear Method (DateTime)

 

Calculates the year of a date represented by a specified DateTime.

Namespace:   System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

public:
virtual int GetYear(
	DateTime time
) override

Parameters

time
Type: System::DateTime

The date value to read. The UmAlQuraCalendar class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 11/16/2077 23:59:59 (Gregorian date).

Return Value

Type: System::Int32

An integer that represents the year specified by the time parameter.

Exception Condition
ArgumentOutOfRangeException

time is outside the range supported by this calendar.

The following example displays the date ranges supported by the UmAlQuraCalendar class in both the Gregorian and Um Al Qura calendars. The GetYear method is used to retrieve the year of the minimum and maximum supported dates in the Um Al Qura calendar if it is not the current culture's current calendar.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: