UmAlQuraCalendar.GetDayOfYear Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Updated: October 2010

Calculates on which day of the year a specified date occurs.

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

Syntax

'Declaration
Public Overrides Function GetDayOfYear ( _
    time As DateTime _
) As Integer
public override int GetDayOfYear(
    DateTime time
)

Parameters

Return Value

Type: System.Int32
An integer from 1 through 355 that represents the day of the year specified by the time parameter.

Exceptions

Exception Condition
ArgumentOutOfRangeException

time is outside the range supported by this calendar.

Remarks

The day of the year is defined as the number of days from the first day of the year. For example, the GetDayOfYear method returns 1 for the first day of the first month of the year, and the total number of days in the year for the last day of the last month.

Examples

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

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Change History

Date

History

Reason

October 2010

Replaced the example.

Customer feedback.