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

Public Member Functions

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

Detailed Description

Definition at line 32 of file malaysia.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 34 of file malaysia.hpp.

34{ return "Malaysia Stock Exchange"; }

◆ isBusinessDay()

bool isBusinessDay ( const Date &  date) const
override

Definition at line 30 of file malaysia.cpp.

30 {
31 Weekday w = date.weekday();
32 Day d = date.dayOfMonth();
33 Month m = date.month();
34 if (isWeekend(w)
35 // New Years
36 || ((d == 1 && m == January) || (d == 31 && m == December && w == Friday) ||
37 (d == 2 && m == January && w == Monday))
38 // Federal Territory Day
39 || ((d == 1 || ((d == 2 || d == 3) && w == Monday)) && m == February)
40 // Labour Day
41 || ((d == 1 || (d == 2 && w == Monday)) && m == May)
42 // National Day
43 || ((d == 31 && m == August) || (d == 1 && w == Monday && m == September))
44 // Malaysia Day
45 || ((d == 16 || (d == 17 && w == Monday)) && m == September)
46 // Christmas
47 || ((d == 25 || (d == 26 && w == Monday)) && m == December))
48 return false;
49 return true;
50}