Locale GetMonthName() Method

Returns Locale-correct name for that month; month should be 0-11 (0 is January).

Function Signature

 string GetMonthName( int month )

string GetMonthName( int month, int hint )

Parameters

Parameter Type Description

day

int

An int that represents the month; 0-11 (0 is January).

hint

int

Values from DateFormatFromLocaleConstants. Indicates if the month name is abbreviated or not.

Return

Type Description

string

The Locale-correct name for the month.

Technical Details

SBM ModScript version: 11.4.

Example

var v1 = TimeT( 1516667515 ).ToTimePoint( CreateTimeZone("MST") );
var month = v1.getMonth();
var fr = CreateLocale("fr"); // Create French locale
// Output month using French locale
Ext.WriteStream( fr.GetMonthName(month, DateFormatFromLocaleConstants.MEDIUM) );

Result:

janv.

Notes

Hint will be a value from DateFormatFromLocaleConstants to determine if the name should be FULL, MEDIUM, or SHORT.

Related Topics

Locale