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

Public Member Functions

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

Detailed Description

Definition at line 32 of file colombia.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 34 of file colombia.hpp.

34{ return "Colombia Stock Exchange"; }

◆ isBusinessDay()

bool isBusinessDay ( const Date &  date) const
override

Definition at line 29 of file colombia.cpp.

29 {
30 Weekday w = date.weekday();
31 Day d = date.dayOfMonth(), dd = date.dayOfYear();
32 Month m = date.month();
33 Year y = date.year();
34 Day em = easterMonday(y);
35 if (isWeekend(w)
36 // New Years Day
37 || ((d == 1 || (d == 2 && w == Monday)) && m == January)
38 // Dia de los Reyes Magos
39 || ((d >= 6 && d <= 12) && w == Monday && m == January)
40 // St. Josephs Day
41 || ((d >= 19 && d <= 25) && w == Monday && m == March)
42 // Maundy Thursday
43 || (dd == em - 4)
44 // Good Friday
45 || (dd == em - 3)
46 // Labour Day
47 || (d == 1 && m == May)
48 // Ascension Day
49 || (dd == em + 42)
50 // Corpus Christi
51 || (dd == em + 63)
52 // Sacred Heart
53 || (dd == em + 70)
54 // Saint Peter and Saint Paul
55 || (((d >= 29 && m == June) || (d <= 5 && m == July)) && w == Monday)
56 // Declaration of Independence
57 || (d == 20 && m == July)
58 // Battle of Boyaca
59 || (d == 7 && m == August)
60 // Assumption
61 || ((d >= 15 && d <= 21) && w == Monday && m == August)
62 // Colombus Day
63 || ((d >= 12 && d <= 18) && w == Monday && m == October)
64 // All Saints Day
65 || ((d >= 1 && d <= 7) && w == Monday && m == November)
66 // Independence of Cartagena
67 || ((d >= 12 && d <= 18) && w == Monday && m == November)
68 // Immaculate Conception
69 || (d == 8 && m == December)
70 // Christmas
71 || (d == 25 && m == December))
72 return false;
73 return true;
74}