/src/quantlib/ql/time/calendars/japan.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) 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 japan.hpp |
21 | | \brief Japanese calendar |
22 | | */ |
23 | | |
24 | | #ifndef quantlib_japanese_calendar_hpp |
25 | | #define quantlib_japanese_calendar_hpp |
26 | | |
27 | | #include <ql/time/calendar.hpp> |
28 | | |
29 | | namespace QuantLib { |
30 | | |
31 | | //! Japanese calendar |
32 | | /*! Holidays: |
33 | | <ul> |
34 | | <li>Saturdays</li> |
35 | | <li>Sundays</li> |
36 | | <li>New Year's Day, January 1st</li> |
37 | | <li>Bank Holiday, January 2nd</li> |
38 | | <li>Bank Holiday, January 3rd</li> |
39 | | <li>Coming of Age Day, 2nd Monday in January</li> |
40 | | <li>National Foundation Day, February 11th</li> |
41 | | <li>Emperor's Birthday, February 23rd since 2020 and December 23rd before</li> |
42 | | <li>Vernal Equinox</li> |
43 | | <li>Greenery Day, April 29th</li> |
44 | | <li>Constitution Memorial Day, May 3rd</li> |
45 | | <li>Holiday for a Nation, May 4th</li> |
46 | | <li>Children's Day, May 5th</li> |
47 | | <li>Marine Day, 3rd Monday in July</li> |
48 | | <li>Mountain Day, August 11th (from 2016 onwards)</li> |
49 | | <li>Respect for the Aged Day, 3rd Monday in September</li> |
50 | | <li>Autumnal Equinox</li> |
51 | | <li>Health and Sports Day, 2nd Monday in October</li> |
52 | | <li>National Culture Day, November 3rd</li> |
53 | | <li>Labor Thanksgiving Day, November 23rd</li> |
54 | | <li>Bank Holiday, December 31st</li> |
55 | | <li>a few one-shot holidays</li> |
56 | | </ul> |
57 | | Holidays falling on a Sunday are observed on the Monday following |
58 | | except for the bank holidays associated with the new year. |
59 | | |
60 | | \ingroup calendars |
61 | | */ |
62 | | class Japan : public Calendar { |
63 | | private: |
64 | | class Impl final : public Calendar::Impl { |
65 | | public: |
66 | 0 | std::string name() const override { return "Japan"; } |
67 | | bool isWeekend(Weekday) const override; |
68 | | bool isBusinessDay(const Date&) const override; |
69 | | }; |
70 | | public: |
71 | | Japan(); |
72 | | }; |
73 | | |
74 | | } |
75 | | |
76 | | |
77 | | #endif |