ICultureInfo.DayName

Syntax

DayName(DayIndex: Integer): String;

Parameters

DayIndex. Index of the day of the week, which name is required to find, according to the selected culture.

Possible parameter values:

1 - Monday.

2 - Tuesday.

3 - Wednesday.

4 - Thursday.

5 - Friday.

6 - Saturday.

0, 7 - Sunday.

Description

The DayName property returns the name of the day of the week, which index is passed as the DayIndex input parameter.

Example

Sub UserProc;
Var
    CI: ICultureInfo;
Begin
    CI := CultureInfo.UserDefault;
    Debug.WriteLine(CI.DayName(1));
    Debug.WriteLine(CI.AbbreviatedDayName(1));
End Sub UserProc;

On executing the example the current culture determined in the operating system will be obtained. Name and the abbreviation of the first week day - Monday - are displayed in the development environment console in the culture language.

See also:

ICultureInfo