Coverage Report

Created: 2026-03-11 06:44

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/quantlib/ql/time/calendars/australia.hpp
Line
Count
Source
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
 Copyright (C) 2000, 2001, 2002, 2003 RiskMap 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 australia.hpp
21
    \brief Australian calendar
22
*/
23
24
#ifndef quantlib_australian_calendar_hpp
25
#define quantlib_australian_calendar_hpp
26
27
#include <ql/time/calendar.hpp>
28
29
namespace QuantLib {
30
31
    //! Australian calendar
32
    /*! Holidays:
33
        <ul>
34
        <li>Saturdays</li>
35
        <li>Sundays</li>
36
        <li>New Year's Day, January 1st (possibly moved to Monday)</li>
37
        <li>Australia Day, January 26th (possibly moved to Monday)</li>
38
        <li>Good Friday</li>
39
        <li>Easter Monday</li>
40
        <li>ANZAC Day. April 25th (possibly moved to Monday)</li>
41
        <li>Queen's Birthday, second Monday in June</li>
42
        <li>Bank Holiday, first Monday in August</li>
43
        <li>Labour Day, first Monday in October</li>
44
        <li>Christmas, December 25th (possibly moved to Monday or Tuesday)</li>
45
        <li>Boxing Day, December 26th (possibly moved to Monday or
46
            Tuesday)</li>
47
        <li>National Day of Mourning for Her Majesty, September 22, 2022</li>
48
        </ul>
49
50
        \ingroup calendars
51
    */
52
    class Australia : public Calendar {
53
      private:
54
        class SettlementImpl final : public Calendar::WesternImpl {
55
          public:
56
0
            std::string name() const override { return "Australia settlement"; }
57
            bool isBusinessDay(const Date&) const override;
58
        };
59
        class AsxImpl final : public Calendar::WesternImpl {
60
          public:
61
0
            std::string name() const override { return "Australia exchange"; }
62
            bool isBusinessDay(const Date&) const override;
63
        };
64
      public:
65
        enum Market { Settlement,     //!< generic settlement calendar
66
                      ASX,       //!< Australia ASX calendar
67
        };
68
        Australia(Market market = Settlement);
69
    };
70
71
}
72
73
#endif