commenthol / date-holidays-parser

parser for worldwide holidays
ISC License
46 stars 22 forks source link

Error: this._shorten is not a function #15

Closed emiltout closed 4 years ago

emiltout commented 4 years ago

Hi here,

I'm trying to use date-holidays in my angular 7 project with typescript. I meet an issue when I intialize new Holidays('US', 'la', 'no') (for exemple) :

image

image

It seems that the problem occurs when the country is made of 2 characters, I have the same problem with new Holidays('Fr'), but when i'm doing new Holidays('France') the result is :

image

Beside, when I use something like image it works fine.

My import is made as follow: image

I think that there is something wrong with my init but i don't understand what.. I'm pretty new in the web development ! Thanks !