You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling in prod setting i get the following error. In dev mode its working.
TypeError: n.addValue is not a function
at e.tagHolidayDefinition (country.js:60)
at abstract-holiday-definition-factory.js:157
at Array.map (<anonymous>)
at t.e.getDefinitionsForAdministrativeUnits (abstract-holiday-definition-factory.js:157)
at t.e.loadDefinitions (abstract-holiday-definition-factory.js:217)
at t.loadDefinitionsCached (index.js:55)
at t.e.getDefinitions (abstract-holiday-definition-factory.js:227)
at t.getHolidayDefinitions (sync-moment-holiday.js:34)
at t.for (sync-moment-holiday.js:51)
at t.isHoliday (sync-moment-holiday.js:39)
Here is my code
import moment from "moment";
import createMomentHolidayConfiguration from "@nesto-software/moment-holiday";
const holidays = createMomentHolidayConfiguration("DE", "NW");
function calcWorkDays(start, end){
let workDays = 0;
do{
start.add(1, 'day');
if([0,6].indexOf(start.day()) == -1 && !start.isHoliday(holidays)){
workDays++;
}
}while(start.isBefore(end))
return workDays;
}
const start = moment("2011-03-01", "yyyy-mm-dd");
const now = moment();
const workDays = calcWorkDays(start,now);
console.log(workDays);
The text was updated successfully, but these errors were encountered:
When compiling in prod setting i get the following error. In dev mode its working.
Here is my code
The text was updated successfully, but these errors were encountered: