Export (0) Print
Expand All

DateTimeFormatInfo.GetDayName Method

Returns the culture-specific full name of the specified day of the week based on the culture associated with the current DateTimeFormatInfo object.

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

public string GetDayName(
	DayOfWeek dayofweek
)

Parameters

dayofweek
Type: System.DayOfWeek

A System.DayOfWeek value.

Return Value

Type: System.String
The culture-specific full name of the day of the week represented by dayofweek.

ExceptionCondition
ArgumentOutOfRangeException

dayofweek is not a valid System.DayOfWeek value.

For the default invariant DateTimeFormatInfo object, this method returns a string from the GregorianCalendar object.

dayofweek

Return Value

Sunday

"Sunday"

Monday

"Monday"

Tuesday

"Tuesday"

Wednesday

"Wednesday"

Thursday

"Thursday"

Friday

"Friday"

Saturday

"Saturday"

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft