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

Public Member Functions

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

Detailed Description

Definition at line 33 of file belgium.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 35 of file belgium.hpp.

35{ return "Belgian settlement"; }

◆ isBusinessDay()

bool isBusinessDay ( const Date &  date) const
override

Definition at line 31 of file belgium.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 // Easter Monday
41 || (dd == em)
42 // Labour Day
43 || (d == 1 && m == May)
44 // Ascension Thursday
45 || (dd == em + 38)
46 // Pentecost Monday
47 || (dd == em + 49)
48 // Independence Day
49 || (d == 21 && m == July)
50 // Assumption Day
51 || (d == 15 && m == August)
52 // All Saints
53 || (d == 1 && m == November)
54 // Armistice Day
55 || (d == 11 && m == November)
56 // Christmas
57 || (d == 25 && m == December))
58 return false;
59 return true;
60}