asp.net.ph

DateTimeFormatInfo.GetDayName Method

System.Globalization Namespace   DateTimeFormatInfo Class


Returns the culture-specific full name of the specified day of the week based on the CultureInfo of the current thread.

[ VB ]
public Function GetDayName ( _
   ByVal dayofweek As DayOfWeek _
) As String

[ C# ]
public string GetDayName ( 
   DayOfWeek dayofweek
);

[ C++ ]
public: String* GetDayName ( 
   DayOfWeek dayofweek
);

[ JScript ]
function GetDayName ( 
   dayofweek : DayOfWeek
) : String;

Parameters

dayofweek
A System.DayOfWeek value.

Return Value

The culture-specific full name of the day of the week represented by dayofweek.

Exceptions


Exception Type Condition
ArgumentOutOfRangeException dayofweek is not a valid System.DayOfWeek value.

Remarks

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"

Example

The below shows how GetDayName can be used to render the name of a given day for each of the available cultures.

 Show me 

See Also

DateTimeFormatInfo Members   CultureInfo   GregorianCalendar   DayNames   System.DayOfWeek Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph