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

Public Member Functions

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

Detailed Description

Definition at line 57 of file switzerland.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 59 of file switzerland.hpp.

59{ return "SIX Swiss Exchange"; }

◆ isBusinessDay()

bool isBusinessDay ( const Date &  date) const
override

Definition at line 71 of file switzerland.cpp.

71 {
72 Weekday w = date.weekday();
73 Day d = date.dayOfMonth(), dd = date.dayOfYear();
74 Month m = date.month();
75 Year y = date.year();
76 Day em = easterMonday(y);
77 if (isWeekend(w)
78 // New Year's Day
79 || (d == 1 && m == January)
80 // Berchtoldstag
81 || (d == 2 && m == January)
82 // Good Friday
83 || (dd == em - 3)
84 // Easter Monday
85 || (dd == em)
86 // Ascension Day
87 || (dd == em + 38)
88 // Whit Monday
89 || (dd == em + 49)
90 // Labour Day
91 || (d == 1 && m == May)
92 // National Day
93 || (d == 1 && m == August)
94 // Christmas Eve
95 || (d == 24 && m == December)
96 // Christmas
97 || (d == 25 && m == December)
98 // St. Stephen's Day
99 || (d == 26 && m == December)
100 // New Year Eve
101 || (d == 31 && m == December))
102 return false;
103 return true;
104}