Locale GetDayOfWeekName() Method

Returns Locale-correct name for that day of week; day should be 0-6 (0 is Sunday).

Function Signature

 string GetDayOfWeekName( int day )

string GetDayOfWeekName( int day, int hint )

Parameters

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.

Return

Type Description

string

The Locale-correct name for the day of the week.

Technical Details

SBM ModScript version: 11.4.

Example

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

Notes

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

Related Topics

Locale