SBM ModScript Reference → Programming SBM ModScript → Object Types → Locale → Locale GetMonthName() Method
Returns Locale-correct name for that month; month should be 0-11 (0 is January).
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. |
Type | Description |
---|---|
string |
The Locale-correct name for the month. |
SBM ModScript version: 11.4.
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.
Hint will be a value from DateFormatFromLocaleConstants to determine if the name should be FULL, MEDIUM, or SHORT.
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.