DateTimeFormatInfo.GetDayName Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Returns the culture-specific full name of the specified day of the week based on the culture associated with the current DateTimeFormatInfo object.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- dayofweek
- Type: System.DayOfWeek
A System.DayOfWeek value.
Return Value
Type: System.StringThe culture-specific full name of the day of the week represented by dayofweek.
| Exception | Condition |
|---|---|
| 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" |