azuyalabs / yasumi

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

add yasumi creation by ISO3166-2 code #61

Closed huehnerhose closed 7 years ago

huehnerhose commented 7 years ago

I want to get holidays based on dynamically gathered region informations. The ISO3166-2 codes I can get out of various map-api. As far as I can see the const ID inside the providers corresponce to ISO3166-2 and is used as index for the getProviders() return array.

Therefore I made a simple wrapper. There aren't any test for this wrapper implemented and I only "tested" it against my usage. (Germany and Subdivisions of Germany).

So this is kind of a "Feature Request" / "Pull Request" mix :)

stelgenhof commented 7 years ago

Very nice! Some others have asked a similar feature as currently you need to know the exact name of the Holiday provider. Would you be able to create a PR?

stelgenhof commented 7 years ago

Closing issue. Resolved by PR #62