Skip to content

Commit

Permalink
Merge pull request #1.
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Jan 8, 2016
2 parents f853a8c + bbb10f5 commit 72c2cbd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion ql/time/calendars/china.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ namespace QuantLib {
|| (y == 2014 && d >= 31 && m == January)
|| (y == 2014 && d <= 6 && m == February)
|| (y == 2015 && d >= 18 && d <= 24 && m == February)
|| (y == 2016 && d >= 8 && d <= 12 && m == February)
// Ching Ming Festival
|| (y <= 2008 && d == 4 && m == April)
|| (y == 2009 && d == 6 && m == April)
Expand All @@ -87,6 +88,7 @@ namespace QuantLib {
|| (y == 2013 && d >= 4 && d <= 5 && m == April)
|| (y == 2014 && d == 7 && m == April)
|| (y == 2015 && d >= 5 && d <= 6 && m == April)
|| (y == 2016 && d == 4 && m == April)
// Labor Day
|| (y <= 2007 && d >= 1 && d <= 7 && m == May)
|| (y == 2008 && d >= 1 && d <= 2 && m == May)
Expand All @@ -99,6 +101,7 @@ namespace QuantLib {
(d == 1 && m == May)))
|| (y == 2014 && d >= 1 && d <=3 && m == May)
|| (y == 2015 && d == 1 && m == May)
|| (y == 2016 && d == 1 && m == May)
// Tuen Ng Festival
|| (y <= 2008 && d == 9 && m == June)
|| (y == 2009 && (d == 28 || d == 29) && m == May)
Expand All @@ -108,6 +111,7 @@ namespace QuantLib {
|| (y == 2013 && d >= 10 && d <= 12 && m == June)
|| (y == 2014 && d == 2 && m == June)
|| (y == 2015 && d == 22 && m == June)
|| (y == 2016 && d >= 9 && d <= 10 && m == June)
// Mid-Autumn Festival
|| (y <= 2008 && d == 15 && m == September)
|| (y == 2010 && d >= 22 && d <= 24 && m == September)
Expand All @@ -116,6 +120,7 @@ namespace QuantLib {
|| (y == 2013 && d >= 19 && d <= 20 && m == September)
|| (y == 2014 && d == 8 && m == September)
|| (y == 2015 && d == 27 && m == September)
|| (y == 2016 && d >= 15 && d <= 16 && m == September)
// National Day
|| (y <= 2007 && d >= 1 && d <= 7 && m == October)
|| (y == 2008 && ((d >= 29 && m == September) ||
Expand All @@ -127,6 +132,7 @@ namespace QuantLib {
|| (y == 2013 && d >= 1 && d <= 7 && m == October)
|| (y == 2014 && d >= 1 && d <= 7 && m == October)
|| (y == 2015 && d >= 1 && d <= 7 && m == October)
|| (y == 2016 && d >= 3 && d <= 7 && m == October)
// 70th anniversary of the victory of anti-Japaneses war
|| (y == 2015 && d >= 3 && d <= 4 && m == September)
)
Expand Down Expand Up @@ -223,7 +229,14 @@ namespace QuantLib {
Date(15,February,2015),
Date(28,February,2015),
Date(6,September,2015),
Date(10,October,2015)
Date(10,October,2015),
// 2016
Date(6,February,2016),
Date(14,February,2016),
Date(12,June,2016),
Date(18,September,2016),
Date(8,October,2016),
Date(9,October,2016)
};
static const Size n =
sizeof(working_weekends)/sizeof(working_weekends[0]);
Expand Down
2 changes: 1 addition & 1 deletion ql/time/calendars/china.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace QuantLib {
</ul>
Other holidays for which no rule is given (data available for
2004-2015 only):
2004-2016 only):
<ul>
<li>Chinese New Year</li>
<li>Ching Ming Festival</li>
Expand Down

0 comments on commit 72c2cbd

Please sign in to comment.