From ff1ee67cc5b439c0e0d8dbf4e0e2f81f94649862 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Mon, 13 Jan 2025 12:23:56 -0600 Subject: [PATCH] Add Auckland as a New Zealand variant --- ChangeLog | 3 +++ src/calendars.cpp | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58c6202..8fa071a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 * DESCRIPTION (Version, Date): Release 0.0.13 diff --git a/src/calendars.cpp b/src/calendars.cpp index 8b4fa7b..ac11e3d 100644 --- a/src/calendars.cpp +++ b/src/calendars.cpp @@ -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());