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 |
13 |
|||
1 |
14 |
|||
2 |
15 |
not used |
||
3 |
16 |
|||
4 |
17 |
|||
5 |
18 |
Lunar = 181 Solar = 182 |
||
6 |
19 |
FullMoon = 191 SpecialRule = 192 Calendrical = 193 |
||
7 |
Lunar = 71 Solar = 72 |
21 |
Lunar = 211 Solar = 212 |
|
8 |
Ethiopic = 80 Ethiopic = 81 Egyptian = 82 Armenian = 83 |
22 |
Lunar = 221 Solar = 222 |
|
9 |
Orthodox |
23 |
Lunar = 231 Solar = 232 |
|
10 |
Bahai |
24 |
Lunar = 241 Solar = 242 |
|
11 |
HinduLunar = 110 HinduSolar = 111 |
25 |
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