system.user.getHoliday
This function is used in Python Scripting.
Descriptionβ
Returns a specific holiday.
Client Permission Restrictionsβ
This scripting function has no Client Permission restrictions.
Syntaxβ
system.user.getHoliday(holidayName)
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| String | holidayName | The name of the holiday to return. Case-sensitive |
Returnsβ
HolidayModel - The holiday, as a HolidayModel object, or None if not found. Add holidays using the system.user.addHoliday function.
Scopeβ
Gateway, Vision Client, Perspective Session
Code Examplesβ
Example #1
# This example will get a holiday and print info about it.
holidayName = "Labor Day"
holiday = system.user.getHoliday(holidayName)
if holiday == None:
print holidayName, "not found"
else:
print holiday.getName(), holiday.getDate(), holiday.isRepeatAnually()
"""The example above outputs the following:
Labor Day 2015-09-07 00:00:00.0 False
"""