I'm using Angular 12 and I would like to check if today is a working day or it's free day for workers. And it's not only about weekend but also about public holidays. I tried use date-holidays package but when I try import it like below
import Holidays from 'date-holidays';
and then use it:
const hd = new Holidays('CZ');
i receive a lot of errors like:
./node_modules/astronomia/src/angle.js:1:0-122 - Error: Module not found: Error: Can't resolve '/Users/user/project/node_modules/@babel/runtime/helpers/esm/slicedToArray' in '/Users/user/project/node_modules/astronomia/src'
Where can be a problem? Maybe you can recommend me another package for this feature? I don't want to use moment.js.
Import Holidays in your Module:
import { HolidayModule } from 'projects/angular-holiday-planner';
@NgModule({
...
imports: [
...
HolidayModule
],
...
})
export class AppModule { }