Skip to main content

TcxSchedulerHolidays.GetHolidayNamesByDate(TDate,string,Boolean) Method

Constructs a string with names of holidays whose dates match the specified date.

Declaration

function GetHolidayNamesByDate(const ADate: TDate; var ANames: string; AOnlyVisible: Boolean = True): Boolean; virtual;

Parameters

Name Type
ADate TDate
ANames string
AOnlyVisible Boolean

Returns

Type
Boolean

Remarks

A holiday name to be written to ANames combines two names – the holiday name itself (see the TcxSchedulerHolidaysLocationHoliday.Name property) and the concatenated holiday location name in parentheses (see the TcxSchedulerHolidaysLocation.Name property).

All the holiday duplicates are automatically deleted, if linked storages are connected to the same TcxSchedulerHolidays component.

In ANames, resulting holiday names are delimited by #13#10 sequence.

ADate specifies the date when holidays take place.

AOnlyVisible specifies which holidays are taken into account. Set AOnlyVisible to True, if you are only interested in holidays which are available to the scheduler (the TcxSchedulerHolidaysLocation.Visible and TcxSchedulerHolidaysLocationHoliday.Visible properties are True). Otherwise, all holidays (stored in the TcxSchedulerHolidays component) will be written to ANames.

The GetHolidayNamesByDate method returns True if the match was successful.

See Also