Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Israel::TelborImpl Class Reference
+ Inheritance diagram for Israel::TelborImpl:
+ Collaboration diagram for Israel::TelborImpl:

Public Member Functions

std::string name () const override
 
bool isWeekend (QuantLib::Weekday w) const override
 
bool isBusinessDay (const QuantLib::Date &date) const override
 

Detailed Description

Definition at line 43 of file israel.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 45 of file israel.hpp.

45{ return "Israel Telbor Implementation"; }

◆ isWeekend()

bool isWeekend ( QuantLib::Weekday  w) const
override

Definition at line 36 of file israel.cpp.

36{ return w == Saturday || w == Sunday; }

◆ isBusinessDay()

bool isBusinessDay ( const QuantLib::Date &  date) const
override

Definition at line 38 of file israel.cpp.

38 {
39
40 Weekday w = date.weekday();
41 Day d = date.dayOfMonth();
42 Month m = date.month();
43 Year y = date.year();
44
45 if (isWeekend(w)
46 // New Year's Day
47 || (d == 1 && m == January)
48 // General Elections
49 || (((d == 9 && m == April) || (d == 17 && m == September)) && y == 2019) ||
50 (d == 2 && m == March && y == 2020)
51 // Holiday abroad
52 || (((d == 22 && m == April) || (d == 27 && m == May)) && y == 2019) ||
53 ((((d == 10 || d == 13) && m == April) || ((d == 8 || d == 25) && m == May)) && y == 2020)
54 // Purim
55 || (d == 24 && m == February && y == 2013) || (d == 16 && m == March && y == 2014) ||
56 (d == 05 && m == March && y == 2015) || (d == 24 && m == March && y == 2016) ||
57 (d == 12 && m == March && y == 2017) || (d == 1 && m == March && y == 2018) ||
58 ((d == 21 || d == 22) && m == March && y == 2019) || ((d == 10 || d == 11) && m == March && y == 2020) ||
59 (d == 26 && m == February && y == 2021) || (d == 17 && m == March && y == 2022) ||
60 (d == 7 && m == March && y == 2023) || (d == 24 && m == March && y == 2024) ||
61 (d == 14 && m == March && y == 2025) || (d == 3 && m == March && y == 2026) ||
62 (d == 23 && m == March && y == 2027) || (d == 12 && m == March && y == 2028) ||
63 (d == 1 && m == March && y == 2029) || (d == 19 && m == March && y == 2030) ||
64 (d == 9 && m == March && y == 2031) || (d == 26 && m == February && y == 2032) ||
65 (d == 15 && m == March && y == 2033) || (d == 5 && m == March && y == 2034) ||
66 (d == 25 && m == March && y == 2035) || (d == 13 && m == March && y == 2036) ||
67 (d == 1 && m == March && y == 2037) || (d == 21 && m == March && y == 2038) ||
68 (d == 10 && m == March && y == 2039) || (d == 28 && m == February && y == 2040) ||
69 (d == 17 && m == March && y == 2041) || (d == 6 && m == March && y == 2042) ||
70 (d == 26 && m == March && y == 2043) ||
71 (d == 13 && m == March && y == 2044)
72 // Passover I and Passover VII
73 || ((((d == 25 || d == 26 || d == 31) && m == March) || (d == 1 && m == April)) && y == 2013) ||
74 ((d == 14 || d == 15 || d == 20 || d == 21) && m == April && y == 2014) ||
75 ((d == 3 || d == 4 || d == 9 || d == 10) && m == April && y == 2015) ||
76 ((d == 22 || d == 23 || d == 28 || d == 29) && m == April && y == 2016) ||
77 ((d == 10 || d == 11 || d == 16 || d == 17) && m == April && y == 2017) ||
78 (((d == 31 && m == March) || ((d == 5 || d == 6) && m == April)) && y == 2018) ||
79 ((d == 19 || d == 26) && m == April && y == 2019) ||
80 ((d == 8 || d == 9 || d == 15) && m == April && y == 2020) ||
81 (((d == 28 && m == March) || (d == 3 && m == April)) && y == 2021) ||
82 ((d == 16 || d == 22) && m == April && y == 2022) || ((d == 6 || d == 12) && m == April && y == 2023) ||
83 ((d == 23 || d == 29) && m == April && y == 2024) || ((d == 13 || d == 19) && m == April && y == 2025) ||
84 ((d == 2 || d == 8) && m == April && y == 2026) || ((d == 22 || d == 28) && m == April && y == 2027) ||
85 ((d == 11 || d == 17) && m == April && y == 2028) ||
86 (((d == 31 && m == March) || (d == 6 && m == April)) && y == 2029) ||
87 ((d == 18 || d == 24) && m == April && y == 2030) || ((d == 8 || d == 14) && m == April && y == 2031) ||
88 (((d == 27 && m == March) || (d == 2 && m == April)) && y == 2032) ||
89 ((d == 14 || d == 20) && m == April && y == 2033) || ((d == 4 || d == 10) && m == April && y == 2034) ||
90 ((d == 24 || d == 30) && m == April && y == 2035) || ((d == 12 || d == 18) && m == April && y == 2036) ||
91 (((d == 31 && m == March) || (d == 6 && m == April)) && y == 2037) ||
92 ((d == 20 || d == 26) && m == April && y == 2038) || ((d == 9 || d == 15) && m == April && y == 2039) ||
93 (((d == 29 && m == March) || (d == 4 && m == April)) && y == 2040) ||
94 ((d == 16 || d == 22) && m == April && y == 2041) || ((d == 5 || d == 11) && m == April && y == 2042) ||
95 (((d == 25 && m == April) || (d == 1 && m == May)) && y == 2043) ||
96 ((d == 12 || d == 18) && m == April && y == 2044)
97 // Israel Independence Day
98 || (d == 9 && m == May && y == 2019) ||
99 (d == 29 && m == April && y == 2020)
100 // Feast of Shavout (Pentecost)
101 || (d == 29 && m == May && y == 2020)
102 // Fast of Ninth of Av
103 || (d == 30 && m == July && y == 2020)
104 // Jewish New Year (Rosh Hashanah eve)
105 || ((d == 4 || d == 5 || d == 6) && m == September && y == 2013) ||
106 ((d == 24 || d == 25 || d == 26) && m == September && y == 2014) ||
107 ((d == 13 || d == 14 || d == 15) && m == September && y == 2015) ||
108 ((d == 2 || d == 3 || d == 4) && m == October && y == 2016) ||
109 ((d == 20 || d == 21 || d == 22) && m == September && y == 2017) ||
110 ((d == 9 || d == 10 || d == 11) && m == September && y == 2018) ||
111 (((d == 30 && m == September) || (d == 1 && m == October)) && y == 2019) ||
112 (d == 18 && m == September && y == 2020) || ((d == 7 || d == 8) && m == September && y == 2021) ||
113 ((d == 26 || d == 27) && m == September && y == 2022) ||
114 ((d == 16 || d == 17) && m == September && y == 2023) || ((d == 3 || d == 4) && m == October && y == 2024) ||
115 ((d == 23 || d == 24) && m == September && y == 2025) ||
116 ((d == 12 || d == 13) && m == September && y == 2026) || ((d == 2 || d == 3) && m == October && y == 2027) ||
117 ((d == 21 || d == 22) && m == September && y == 2028) ||
118 ((d == 10 || d == 11) && m == September && y == 2029) ||
119 ((d == 28 || d == 29) && m == September && y == 2030) ||
120 ((d == 18 || d == 19) && m == September && y == 2031) || ((d == 6 || d == 7) && m == September && y == 2032) ||
121 ((d == 24 || d == 25) && m == September && y == 2033) ||
122 ((d == 14 || d == 15) && m == September && y == 2034) || ((d == 4 || d == 5) && m == October && y == 2035) ||
123 ((d == 22 || d == 23) && m == September && y == 2036) ||
124 ((d == 10 || d == 11) && m == September && y == 2037) ||
125 (((d == 30 && m == September) || (d == 01 && m == October)) && y == 2038) ||
126 ((d == 19 || d == 20) && m == September && y == 2039) || ((d == 8 || d == 9) && m == September && y == 2040) ||
127 ((d == 26 || d == 27) && m == September && y == 2041) ||
128 ((d == 15 || d == 16) && m == September && y == 2042) || ((d == 5 || d == 6) && m == October && y == 2043) ||
129 ((d == 22 || d == 23) && m == September && y == 2044)
130 // New Year's Day
131 || (d == 1 && m == January)
132 // Day of Atonement (Yom Kippur)
133 || ((d == 8 || d == 9) && m == October && y == 2019) ||
134 (d == 28 && m == September && y == 2020)
135 // First Day of Sukkot (Tabernacles)
136 || (d == 14 && m == October && y == 2019)
137 // Rejoicing of the Law Festival (Simchat Torah)
138 || (d == 21 && m == October && y == 2019)
139 // last Monday of May (Spring Bank Holiday)
140 || (d >= 25 && w == Monday && m == May && y != 2002 && y != 2012)
141 // Christmas
142 || (d == 25 && m == December)
143 // Day of Goodwill
144 || (d == 26 && m == December && (y >= 2000 && y != 2020)))
145 return false;
146
147 return true;
148}
bool isWeekend(QuantLib::Weekday w) const override
Definition: israel.cpp:36