Closed mgwebgroup closed 6 years ago
Thanks for the PR! Let me have a look at it this coming weekend.
Hi @mgwebgroup ,
I had a look at your PR and am not sure if this would be the right approach. NYSE wouldn't be a 'real' country/subregion since your class merely is a subset of the USA Holiday provider. I think a better approach would be to create it as a filter.
Cheers! Sacha
Allright, I'll see what I can do. Do you have a preference for a filter name?
The filter name can be anything, as long as it is clear :) It would be very easy to implement: just check the dates that are considered part of the NYSE calendar in the 'accept' method of the filter.
The only small catch is that this filter will only work with the USA Holiday provider.
I'll see what I can do. Thanks for the suggestion. I will be able to look into this after September 1st.
Sure no problem!
I have added a recipe how you can easily extend an existing holiday provider to create your own custom provider: https://azuyalabs.github.io/yasumi/cookbook/custom_provider
Note: you need to use the latest v1.8.0 release for this to work :)
Added class NYSE.php to the Provider directory. The class uses holidays observed by the New York Stock Exchange published on https://www.nyse.com/markets/hours-calendars
Added test classes 'tests/GoodFridayTest.php' and 'tests/NYSETest.php'