azuyalabs / yasumi

The easy PHP Library for calculating holidays
https://www.yasumi.dev
Other
1.05k stars 155 forks source link

Use country code instead of name? #244

Closed websecureNL closed 3 years ago

websecureNL commented 3 years ago

I could not find this in the documentation, but is it possible to create a new holiday provider instance with the country code instead of name?

So Yasumi\Yasumi::create('NL', $year); instead of Yasumi\Yasumi::create('Netherlands', $year);

stelgenhof commented 3 years ago

Yes, there isn't really an extensive API documentation. To answer your question, you can already do that using an alternative method: createByISO3166_2 :)

websecureNL commented 3 years ago

Great! Thank you for your work and the quick reply :-)