pp108 : getMonth

getMonth


Returns the month name for the index in the corresponding locale

Syntax

localeObject.getMonth(sPattern)

Parameters

Parameter

Description

monthName

Required. The month name.


Return Value


Returns the index for the month name

Remarks

Indexing starts from zero (0)

Example


The following example displays how this method is used.

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

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

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

See Also


Locale