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

Public Member Functions

std::string name () const override
 
bool isBusinessDay (const QuantLib::Date &) const override
 

Detailed Description

Definition at line 59 of file greece.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 61 of file greece.hpp.

61{ return "Greece"; }

◆ isBusinessDay()

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

Definition at line 31 of file greece.cpp.

31 {
32 Weekday w = date.weekday();
33 Day d = date.dayOfMonth(), dd = date.dayOfYear();
34 Month m = date.month();
35 Year y = date.year();
36 Day em = easterMonday(y);
37 Day laborDay = Date(1, May, y).dayOfYear();
38
39 if (isWeekend(w)
40 // New Year's Day
41 || (d == 1 && m == January)
42 // Ephiphany Day
43 || (d == 6 && m == January)
44 // Clean Monday
45 || (dd == em - 49)
46 // Good Friday
47 || (dd == em - 3)
48 // Easter Monday
49 || (dd == em)
50 // Greek Independence Day
51 || (m == Mar && d == 25)
52 // Labour Day
53 || (m == May && ((d == 1) || ((w==Tuesday) && (d<=5) && (em-3 <= laborDay && laborDay <= em))))
54 // Orthodox Pentecoast (Whit) Monday
55 || (dd == em + 49)
56 // Assumption Day
57 || (m == August && d == 15)
58 // Greek National Day
59 || (m == October && d == 28)
60 // Christmas Day
61 || (m == December && d == 25)
62 // Christmas Day
63 || (m == December && d == 26))
64 return false; // NOLINT(readability-simplify-boolean-expr)
65 return true;
66}