ISCountryHolidays.GetHolidayName

Description

This function returns the name of the holiday celebrated on the specified date.

Syntax

object.GetHolidayName(aDate)

Part Attribute Type Description
object Required
The object always implements the ISCountryHolidays interface
aDate In, Required
DateTime
The specified date

Return Value

string

Returns the name of the holiday celebrated on the specified date.

Example

Display the name of the holiday celebrated on the specified date.

Dim aCountryHolidays
Dim aDate
Dim aMessage 

Set aCountryHolidays = Profile.GetCountryHolidays
aDate = "01/01/2019" 

if aCountryHolidays.IsHoliday(aDate) then
  aMessage = "On " & aDate & " there is " & aCountryHolidays.GetHolidayName(aDate) 
else
  aMessage = "On " & aDate & " there are no holidays "
end if

Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface the calendar with Country Holidays can be found in Special > Appointments.

Version information

Added in v7.8.0