Coverage Report

Created: 2025-09-04 07:11

/src/quantlib/ql/time/calendars/indonesia.hpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
 Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011 StatPro Italia srl
5
6
 This file is part of QuantLib, a free-software/open-source library
7
 for financial quantitative analysts and developers - http://quantlib.org/
8
9
 QuantLib is free software: you can redistribute it and/or modify it
10
 under the terms of the QuantLib license.  You should have received a
11
 copy of the license along with this program; if not, please email
12
 <quantlib-dev@lists.sf.net>. The license is also available online at
13
 <https://www.quantlib.org/license.shtml>.
14
15
 This program is distributed in the hope that it will be useful, but WITHOUT
16
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17
 FOR A PARTICULAR PURPOSE.  See the license for more details.
18
*/
19
20
/*! \file indonesia.hpp
21
    \brief Indonesian calendars
22
*/
23
24
#ifndef quantlib_indonesia_calendar_hpp
25
#define quantlib_indonesia_calendar_hpp
26
27
#include <ql/time/calendar.hpp>
28
29
namespace QuantLib {
30
31
    //! %Indonesian calendars
32
    /*! Holidays for the Indonesia stock exchange
33
        (data from <http://www.idx.co.id/>):
34
        <ul>
35
        <li>Saturdays</li>
36
        <li>Sundays</li>
37
        <li>New Year's Day, January 1st</li>
38
        <li>Good Friday</li>
39
        <li>Ascension of Jesus Christ</li>
40
        <li>Independence Day, August 17th</li>
41
        <li>Christmas, December 25th</li>
42
        </ul>
43
44
        Other holidays for which no rule is given
45
        (data available for 2005-2014 only:)
46
        <ul>
47
        <li>Idul Adha</li>
48
        <li>Ied Adha</li>
49
        <li>Imlek</li>
50
        <li>Moslem's New Year Day</li>
51
        <li>Chinese New Year</li>
52
        <li>Nyepi (Saka's New Year)</li>
53
        <li>Birthday of Prophet Muhammad SAW</li>
54
        <li>Waisak</li>
55
        <li>Ascension of Prophet Muhammad SAW</li>
56
        <li>Idul Fitri</li>
57
        <li>Ied Fitri</li>
58
        <li>Other national leaves</li>
59
        </ul>
60
        \ingroup calendars
61
    */
62
    class Indonesia : public Calendar {
63
      private:
64
        class BejImpl final : public Calendar::WesternImpl {
65
          public:
66
0
            std::string name() const override { return "Jakarta stock exchange"; }
67
            bool isBusinessDay(const Date&) const override;
68
        };
69
      public:
70
        enum Market { BEJ,  //!< Jakarta stock exchange (merged into IDX)
71
                      JSX,  //!< Jakarta stock exchange (merged into IDX)
72
                      IDX   //!< Indonesia stock exchange
73
        };
74
        Indonesia(Market m = IDX);
75
    };
76
77
}
78
79
80
#endif