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

Private Member Functions

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

Detailed Description

Definition at line 34 of file mauritius.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
overrideprivate

Definition at line 35 of file mauritius.hpp.

35{ return "Stock Exchange of Mauritius"; }

◆ isBusinessDay()

bool isBusinessDay ( const Date &  date) const
overrideprivate

Definition at line 28 of file mauritius.cpp.

28 {
29 Weekday w = date.weekday();
30 Day d = date.dayOfMonth();
31 Month m = date.month();
32 Year y = date.year();
33
34 if(isWeekend(w)
35 // New year's day
36 || (d == 1 && m == January)
37 // Abolition of slavery
38 || (d == 1 && m == February )
39 // Independence and Republic day
40 || (d == 12 && m == March )
41 // Labour day
42 || (d == 1 && m == May)
43 // Arrival of indentured laborers
44 || (d == 2 && m == November)
45 // Christmas
46 || (d == 25 && m == December )
47 )
48 return false;
49 if(y == 2022){
50 if( // New year holiday
51 (d == 3 && m == January)
52 // Thaipoosam Cavadee
53 || (d == 18 && m == January)
54 // Chinese Spring Festival
55 || (d == 1 && m == February )
56 // Maha Shivaratree
57 || (d == 1 && m == March )
58 // Eid-Ul-Fitr
59 || (d == 3 && m == May )
60 // Assumption of the blessed Virgin Mary
61 || (d == 15 && m == August)
62 // Ganesh Chartuthi
63 || (d == 1 && m == September)
64 // Divali
65 || (d == 24 && m == October)
66 )
67 return false;
68 }
69 else if (y == 2023){
70 if( // New year holiday
71 (d == 2 && m == January)
72 // New year holiday
73 || (d == 3 && m == January)
74 // Ugaadi
75 || (d == 22 && m == March )
76 // Labour day
77 || (d == 1 && m == May )
78 // Ganesh Chartuthi
79 || (d == 20 && m == September)
80 //All Saints Day
81 || (d == 1 && m == November)
82 )
83 return false;
84 }
85 return true;
86}