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

Public Member Functions

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

Detailed Description

Definition at line 35 of file unitedarabemirates.hpp.

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 37 of file unitedarabemirates.hpp.

37{ return "United Arab Emirates"; }

◆ isWeekend()

bool isWeekend ( Weekday  ) const
override

Definition at line 36 of file unitedarabemirates.cpp.

36 {
37 return w == QuantLib::Saturday || w == QuantLib::Sunday ;
38}

◆ isBusinessDay()

bool isBusinessDay ( const Date &  ) const
override

Definition at line 40 of file unitedarabemirates.cpp.

40 {
41 Day n = d.dayOfMonth();
42 Month m = d.month();
43
44 if (isTrueWeekend(d) ||
45 (n==1 && m == Jan) || // Gregorian new year
46 (n==2 && m == Dec)) // National Day
47 return false;
48 else
49 return true;
50}