pp108 : getDay

getDay


Returns the index for the day name for the corresponding locale

Syntax

localeObject.getDay(dayName)

Parameters

Parameter

Description

dayName

Required. The full name of the day.

Return Value


Returns the index for the day name

Note: The indexing starts from zero (0).

Example


The following example displays how this method is used.

importType("wcp.library.util.LocaleFormat");

importType("wcp.library.util.Locale");

var localeObject = new Locale(sLocale);//sLocale --> "en-US"
localeObject.getDay("Tuesday");//Will return "2" for locale "en-US"

See Also


Locale, Locales