29 static ext::shared_ptr<Calendar::Impl> sseImpl(
new China::SseImpl);
30 static ext::shared_ptr<Calendar::Impl> IBImpl(
new China::IbImpl);
57 || (
y == 2006 && (
d == 2 ||
d == 3) && m ==
January)
62 || (
y == 2012 && (
d == 2 ||
d == 3) && m ==
January)
75 || (
y == 2004 &&
d >= 19 &&
d <= 28 && m ==
January)
76 || (
y == 2005 &&
d >= 7 &&
d <= 15 && m ==
February)
77 || (
y == 2006 && ((
d >= 26 && m ==
January) ||
79 || (
y == 2007 &&
d >= 17 &&
d <= 25 && m ==
February)
80 || (
y == 2008 &&
d >= 6 &&
d <= 12 && m ==
February)
81 || (
y == 2009 &&
d >= 26 &&
d <= 30 && m ==
January)
82 || (
y == 2010 &&
d >= 15 &&
d <= 19 && m ==
February)
84 || (
y == 2012 &&
d >= 23 &&
d <= 28 && m ==
January)
85 || (
y == 2013 &&
d >= 11 &&
d <= 15 && m ==
February)
88 || (
y == 2015 &&
d >= 18 &&
d <= 24 && m ==
February)
89 || (
y == 2016 &&
d >= 8 &&
d <= 12 && m ==
February)
90 || (
y == 2017 && ((
d >= 27 && m ==
January) ||
92 || (
y == 2018 && (
d >= 15 &&
d <= 21 && m ==
February))
94 || (
y == 2020 && (
d == 24 || (
d >= 27 &&
d <= 31)) && m ==
January)
95 || (
y == 2021 && (
d == 11 ||
d == 12 ||
d == 15 ||
d == 16 ||
d == 17) && m ==
February)
97 || (
y == 2023 &&
d >= 23 &&
d <= 27 && m ==
January)
98 || (
y == 2024 && (
d == 9 || (
d >= 12 &&
d <= 16)) && m ==
February)
100 || (
y <= 2008 &&
d == 4 && m ==
April)
101 || (
y == 2009 &&
d == 6 && m ==
April)
102 || (
y == 2010 &&
d == 5 && m ==
April)
103 || (
y == 2011 &&
d >=3 &&
d <= 5 && m ==
April)
104 || (
y == 2012 &&
d >= 2 &&
d <= 4 && m ==
April)
105 || (
y == 2013 &&
d >= 4 &&
d <= 5 && m ==
April)
106 || (
y == 2014 &&
d == 7 && m ==
April)
107 || (
y == 2015 &&
d >= 5 &&
d <= 6 && m ==
April)
108 || (
y == 2016 &&
d == 4 && m ==
April)
109 || (
y == 2017 &&
d >= 3 &&
d <= 4 && m ==
April)
110 || (
y == 2018 &&
d >= 5 &&
d <= 6 && m ==
April)
111 || (
y == 2019 &&
d == 5 && m ==
April)
112 || (
y == 2020 &&
d == 6 && m ==
April)
113 || (
y == 2021 &&
d == 5 && m ==
April)
114 || (
y == 2022 &&
d >= 4 &&
d <= 5 && m ==
April)
115 || (
y == 2023 &&
d == 5 && m ==
April)
116 || (
y == 2024 &&
d >= 4 &&
d <= 5 && m ==
April)
118 || (y <= 2007 && d >= 1 &&
d <= 7 && m ==
May)
119 || (
y == 2008 &&
d >= 1 &&
d <= 2 && m ==
May)
120 || (
y == 2009 &&
d == 1 && m ==
May)
121 || (
y == 2010 &&
d == 3 && m ==
May)
122 || (
y == 2011 &&
d == 2 && m ==
May)
123 || (
y == 2012 && ((
d == 30 && m ==
April) ||
124 (
d == 1 && m ==
May)))
125 || (
y == 2013 && ((
d >= 29 && m ==
April) ||
126 (
d == 1 && m ==
May)))
127 || (
y == 2014 &&
d >= 1 &&
d <=3 && m ==
May)
128 || (
y == 2015 &&
d == 1 && m ==
May)
129 || (
y == 2016 &&
d >= 1 &&
d <=2 && m ==
May)
130 || (
y == 2017 &&
d == 1 && m ==
May)
131 || (
y == 2018 && ((
d == 30 && m ==
April) || (
d == 1 && m ==
May)))
132 || (
y == 2019 &&
d >= 1 &&
d <=3 && m ==
May)
133 || (
y == 2020 && (
d == 1 ||
d == 4 ||
d == 5) && m ==
May)
134 || (
y == 2021 && (
d == 3 ||
d == 4 ||
d == 5) && m ==
May)
135 || (
y == 2022 &&
d >= 2 &&
d <= 4 && m ==
May)
136 || (
y == 2023 &&
d >= 1 &&
d <= 3 && m ==
May)
137 || (
y == 2024 &&
d >= 1 &&
d <= 3 && m ==
May)
139 || (
y <= 2008 &&
d == 9 && m ==
June)
140 || (
y == 2009 && (
d == 28 ||
d == 29) && m ==
May)
141 || (
y == 2010 &&
d >= 14 &&
d <= 16 && m ==
June)
142 || (
y == 2011 &&
d >= 4 &&
d <= 6 && m ==
June)
143 || (
y == 2012 &&
d >= 22 &&
d <= 24 && m ==
June)
144 || (
y == 2013 &&
d >= 10 &&
d <= 12 && m ==
June)
145 || (
y == 2014 &&
d == 2 && m ==
June)
146 || (
y == 2015 &&
d == 22 && m ==
June)
147 || (
y == 2016 &&
d >= 9 &&
d <= 10 && m ==
June)
148 || (
y == 2017 &&
d >= 29 &&
d <= 30 && m ==
May)
149 || (
y == 2018 &&
d == 18 && m ==
June)
150 || (
y == 2019 &&
d == 7 && m ==
June)
151 || (
y == 2020 &&
d >= 25 &&
d <= 26 && m ==
June)
152 || (
y == 2021 &&
d == 14 && m ==
June)
153 || (
y == 2022 &&
d == 3 && m ==
June)
154 || (
y == 2023 &&
d >= 22 &&
d <= 23 && m ==
June)
155 || (
y == 2024 &&
d == 10 && m ==
June)
167 || (
y == 2021 && (
d == 20 ||
d == 21) && m ==
September)
172 || (y <= 2007 && d >= 1 &&
d <= 7 && m ==
October)
175 || (
y == 2009 &&
d >= 1 &&
d <= 8 && m ==
October)
176 || (
y == 2010 &&
d >= 1 &&
d <= 7 && m ==
October)
177 || (
y == 2011 &&
d >= 1 &&
d <= 7 && m ==
October)
178 || (
y == 2012 &&
d >= 1 &&
d <= 7 && m ==
October)
179 || (
y == 2013 &&
d >= 1 &&
d <= 7 && m ==
October)
180 || (
y == 2014 &&
d >= 1 &&
d <= 7 && m ==
October)
181 || (
y == 2015 &&
d >= 1 &&
d <= 7 && m ==
October)
182 || (
y == 2016 &&
d >= 3 &&
d <= 7 && m ==
October)
183 || (
y == 2017 &&
d >= 2 &&
d <= 6 && m ==
October)
184 || (
y == 2018 &&
d >= 1 &&
d <= 5 && m ==
October)
185 || (
y == 2019 &&
d >= 1 &&
d <= 7 && m ==
October)
186 || (
y == 2020 &&
d >= 1 &&
d <= 2 && m ==
October)
187 || (
y == 2020 &&
d >= 5 &&
d <= 8 && m ==
October)
188 || (
y == 2021 && (
d == 1 ||
d == 4 ||
d == 5 ||
d == 6 ||
d == 7) && m ==
October)
189 || (
y == 2022 &&
d >= 3 &&
d <= 7 && m ==
October)
190 || (
y == 2023 &&
d >= 2 &&
d <= 6 && m ==
October)
191 || (
y == 2024 && ((
d >= 1 &&
d <= 4) ||
d == 7) && m ==
October)
204 static const std::set<Date> workingWeekends = {
361 return sseImpl->isBusinessDay(date) ||
362 (workingWeekends.find(date) != workingWeekends.end());
bool isWeekend(Weekday w) const
ext::shared_ptr< Impl > impl_
bool isBusinessDay(const Date &) const override
bool isWeekend(Weekday) const override
bool isBusinessDay(const Date &) const override
bool isWeekend(Weekday) const override
@ SSE
Shanghai stock exchange.
Classes and functions for error handling.
#define QL_FAIL(message)
throw an error (possibly with file and line information)