Skip to content

Commit

Permalink
Add Auckland as a New Zealand variant
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Jan 13, 2025
1 parent 8cd9096 commit ff1ee67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* src/ql/time/calendars/newzealand.?pp: Updated from QuantLib 1.37 (rc)
* src/ql/time/calendars/unitedstates.cpp: Idem

* src/calendars.cpp (QlCal::CalendarContainer::setCalendar): Add
'Auckland' to new New Zealand with 'Wellington' the default as before

2024-10-15 Dirk Eddelbuettel <[email protected]>

* DESCRIPTION (Version, Date): Release 0.0.13
Expand Down
7 changes: 5 additions & 2 deletions src/calendars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,11 @@ void QlCal::CalendarContainer::setCalendar(const std::string txt = "TARGET") {
} else if (txt == "Mexico") {
p_cal.reset(new ql::Mexico());

} else if (txt == "NewZealand") {
p_cal.reset(new ql::NewZealand());
} else if (txt == "NewZealand" ||
txt == "NewZealand/Wellington") {
p_cal.reset(new ql::NewZealand(ql::NewZealand::Wellington));
} else if (txt == "NewZealand/Auckland") {
p_cal.reset(new ql::NewZealand(ql::NewZealand::Auckland));

} else if (txt == "Norway") {
p_cal.reset(new ql::Norway());
Expand Down

0 comments on commit ff1ee67

Please sign in to comment.