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

Public Member Functions

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

Detailed Description

Definition at line 33 of file philippines.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 35 of file philippines.hpp.

35{ return "Philippine stock exchange"; }

◆ isBusinessDay()

bool isBusinessDay ( const Date &  date) const
override

Definition at line 30 of file philippines.cpp.

30 {
31 Weekday w = date.weekday();
32 Day d = date.dayOfMonth(), dd = date.dayOfYear();
33 Month m = date.month();
34 Year y = date.year();
35 Day em = easterMonday(y);
36 if (isWeekend(w)
37 // New Years Day
38 || ((d == 1 || (d == 2 && w == Monday)) && m == January)
39 // Day of Valor
40 || (d == 9 && m == April)
41 // Maundy Thursday
42 || (dd == em - 4)
43 // Good Friday
44 || (dd == em - 3)
45 // Labor Day
46 || (d == 1 && m == May)
47 // Independence Day
48 || (d == 12 && m == June)
49 // Ninoy Aquino Day
50 || (d == 21 && m == August)
51 // National Heroes (last Mon of August)
52 || (d >= 25 && w == Monday && m == August)
53 // All Saints Day
54 || (d == 1 && m == November)
55 // Bonifacio Day
56 || (d == 30 && m == November)
57 // Christmas
58 || ((d == 25 || (d == 27 && (w == Monday || w == Tuesday))) && m == December)
59 // Rizal Day
60 || ((d == 30 && m == December) || (d == 2 && m == January && w == Tuesday))
61 // New Years Eve
62 || (d == 31 && m == December))
63 return false;
64 return true;
65}