Please enable JavaScript to view this site.

 

int = GetHolTypeFromTable()

 

This macro function returns a number that corresponds to the type of recurrence of the current holiday in the holidays table.

 

The current holiday in the holidays table is due to previous calls to functions which move the cursor in the holidays table, such as FindNextHolidayOnDate and GetNextDateForHolidayId.

 

The correspondence between the values returned by this function and the various types of holidays is given in the table below.

 

Value

Rule Type


Value

Rule Type

0

Fixed


11

Hindu

HinduLunar = 110

HinduSolar = 111

1

Variable


12

not used

2

Easter


13

Sikh

3

Arbitrary


14

Solar

4

Jewish


15

not used

5

Range


16

Lunisolar

6

Muslim


17

Persian

7

Chinese

Lunar = 71

Solar = 72


18

Korean

Lunar = 181

Solar = 182

8

Egyptian

Ethiopic = 80

Ethiopic = 81

Egyptian = 82

Armenian = 83


19

South-East Asian

FullMoon = 191

SpecialRule = 192

Calendrical = 193

9

Orthodox


 


10

Bahai


 


 

Note that the Chinese, Egyptian, Hindu, Korean and South-East Asian types of rules each have sub-types whose values can also be obtained using the GetHolTypeFromTable function.

nFullHolType = GetHolTypeFromTable()
if nFullHolType > 50
   // it has a sub-type, so we extract the major and minor parts
   nMajorRuleType = (nFullHolType div 10
   nMinorRuleType = (nFullHolType mod 10
else
   // it does not have a sub-type
   nMajorRuleType = nFullHolType 
   nMinorRuleType = 0
endif

See also: holidays macro functions.