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


13

Sikh

1

Variable


14

Solar

2

Easter


15

not used

3

Arbitrary


16

Lunisolar

4

Jewish


17

Persian

5

Range


18

Korean

Lunar = 181

Solar = 182

6

Muslim


19

South-East Asian

FullMoon = 191

SpecialRule = 192

Calendrical = 193

7

Chinese

Lunar = 71

Solar = 72


21

Burmese

Lunar = 211

Solar = 212

8

Egyptian

Ethiopic = 80

Ethiopic = 81

Egyptian = 82

Armenian = 83


22

Tibetan

Lunar = 221

Solar = 222

9

Orthodox


23

Bhutanese

Lunar = 231

Solar = 232

10

Bahai


24

Mongolian

Lunar = 241

Solar = 242

11

Hindu

HinduLunar = 110

HinduSolar = 111


25

Zoroastrian

Parsi = 250

Kadmi = 251 (not used)

Fasli = 252 (not used)

12

not used


 


 

Note that many types of calendrical rules, such those for the Chinese, Egyptian, Hindu, Korean and South-East Asian recurrence 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.

 


Topic 176825, last updated on 30-Oct-2023