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

Public Member Functions

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

Detailed Description

Definition at line 64 of file cyprus.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 66 of file cyprus.hpp.

66{ return "Cyprus"; }

◆ isBusinessDay()

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

Definition at line 31 of file cyprus.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
38 if (isWeekend(w)
39 // New Year's Day
40 || (d == 1 && m == January)
41 // Ephiphany Day
42 || (d == 6 && m == January)
43 // Green Monday
44 || (dd == em-49)
45 // Good Friday
46 || (dd == em-3)
47 // Easter Monday
48 || (dd == em)
49 // Easter Tuesday
50 || (dd == em+1)
51 // Greek Independence Day
52 || (m == Mar && d == 25)
53 // National Day
54 || (m == Apr && d == 1)
55 // Labour Day
56 || (m == May && d == 1)
57 // Orthodox Pentecoast (Whit) Monday
58 || (dd == em+49)
59 // Assumption Day (Theotokos)
60 || (m == August && d == 15)
61 // Cyprus Independence Day
62 || (m == October && d == 1)
63 // Greek National Day
64 || (m == October && d == 28)
65 // Christmas Day
66 || (m == December && d == 25)
67 // Boxing Day
68 || (m == December && d == 26))
69 return false; // NOLINT(readability-simplify-boolean-expr)
70 return true;
71 }