This documentation is archived and is not being maintained.

UmAlQuraCalendar::GetEra Method

Calculates the era in which a specified date occurs.

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

public:
virtual int GetEra(
	DateTime time
) override

Parameters

time
Type: System::DateTime
The date value to read.

Return Value

Type: System::Int32
Always returns the UmAlQuraEra value.

ExceptionCondition
ArgumentOutOfRangeException

time is outside the range supported by this calendar.

The Um Al Qura calendar recognizes one era: A.H. (Latin "Anno Hegirae", which means "the year of the migration," in reference to the migration of Muhammad (PBUH) from Mecca).

The following example displays the values of several components of a date in the Um Al Qura calendar.

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

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: