29 bool isTrueWeekend(Date
d) {
32 return (
d < Date(29,
June, 2013)) ?
52 bool isEidAlAdha(Date
d) {
55 static std::vector<Date> EidAlAdha = {
57 Date(27,
March, 1999),
58 Date(16,
March, 2000),
84 return std::any_of(EidAlAdha.begin(), EidAlAdha.end(),
85 [=](Date p) { return d >= p - 1 && d <= p + 4; });
88 bool isEidAlFitr(Date
d) {
91 static std::vector<Date> EidAlFitr = {
123 return std::any_of(EidAlFitr.begin(), EidAlFitr.end(),
124 [=](Date p) { return d >= p - 1 && d <= p + 4; });
131 static ext::shared_ptr<Calendar::Impl> tadawulImpl(
151 if (isTrueWeekend(date)
158 || (
d == 19 && m ==
March &&
y==2011)
ext::shared_ptr< Impl > impl_
bool isBusinessDay(const Date &) const override
bool isWeekend(Weekday) const override
SaudiArabia(Market m=Tadawul)
@ Tadawul
Tadawul financial market.
Classes and functions for error handling.
#define QL_FAIL(message)
throw an error (possibly with file and line information)