DateTimeFormatInfo.GetDayName Method

July 28, 2014

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
Assembly:  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, this method returns a string from the GregorianCalendar.

dayofweek

Return value

Sunday

"Sunday"

Monday

"Monday"

Tuesday

"Tuesday"

Wednesday

"Wednesday"

Thursday

"Thursday"

Friday

"Friday"

Saturday

"Saturday"

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft