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

Public Member Functions

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

Detailed Description

Definition at line 33 of file netherlands.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 35 of file netherlands.hpp.

35{ return "Dutch settlement"; }

◆ isBusinessDay()

bool isBusinessDay ( const Date &  date) const
override

Definition at line 31 of file netherlands.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 if (isWeekend(w)
38 // New Years Day
39 || (d == 1 && m == January)
40 // Good Friday
41 || (dd == em - 3)
42 // Easter Monday
43 || (dd == em)
44 // King's Birthday
45 || (d == 27 && m == April)
46 // Ascension Thursday
47 || (dd == em + 38)
48 // Whit Monday
49 || (dd == em + 49)
50 // Christmas
51 || (d == 25 && m == December)
52 // Boxing Day
53 || (d == 26 && m == December))
54 return false;
55 return true;
56}