Commit 126f80ee authored by Johannes Bill's avatar Johannes Bill

add CH to allowed holidays, fix year

parent 90372e69
...@@ -32,7 +32,7 @@ const variableOffsets = { ...@@ -32,7 +32,7 @@ const variableOffsets = {
const holidayCache = {}; const holidayCache = {};
function getDateHolidays(countryCode) { function getDateHolidays(countryCode) {
if (!(countryCode in holidayCache)) { if (!(countryCode in holidayCache)) {
holidayCache[countryCode] = new DateHolidays(countryCode).getHolidays(2022); holidayCache[countryCode] = new DateHolidays(countryCode).getHolidays(2023);
} }
return holidayCache[countryCode]; return holidayCache[countryCode];
...@@ -151,7 +151,7 @@ function Holidays(year) { ...@@ -151,7 +151,7 @@ function Holidays(year) {
} }
this.getAllHolidays = function (info, epochSpan, cb) { this.getAllHolidays = function (info, epochSpan, cb) {
if (info.countryCode && ['DE', 'AT', 'GB', 'US'].includes(info.countryCode)) { if (info.countryCode && ['DE', 'AT', 'GB', 'US', 'CH', 'IT', 'LU', 'TZ'].includes(info.countryCode)) {
const holidayDays = getDateHolidays(info.countryCode) const holidayDays = getDateHolidays(info.countryCode)
.filter(x => x.type === 'public') .filter(x => x.type === 'public')
.map(x => { .map(x => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment