SBM ModScript Reference → Programming SBM ModScript → Object Types → Locale → Locale GetDayOfWeekName() Method
Returns Locale-correct name for that day of week; day should be 0-6 (0 is Sunday).
| Parameter | Type | Description |
|---|---|---|
|
day |
int |
An int that represents the day of the week; 0-6 (0 is Sunday). |
|
hint |
int |
Values from DateFormatFromLocaleConstants. Indicates if the day of week name is abbreviated or not. |
| Type | Description |
|---|---|
|
string |
The Locale-correct name for the day of the week. |
SBM ModScript version: 11.4.
var v1 = TimeMillis( 1516667515006ll ).ToTimePoint( CreateTimeZone("MST") );
var dayOfWeek = v1.getDayOfWeek();
var fr = CreateLocale("fr"); // Create French locale
Ext.WriteStream( fr.GetDayOfWeekName(dayOfWeek) ); // Output day of week using French locale
Result:
lundi
Hint will be a value from DateFormatFromLocaleConstants to determine if the name should be FULL, MEDIUM, or SHORT.
Copyright © 2007–2020 Micro Focus or one of its affiliates. All rights reserved.