spatie / holidays

Calculate which days you don't have to work!
https://spatie.be/open-source
MIT License
329 stars 196 forks source link

Support for Taiwan holidays #124

Closed takeshiyu closed 9 months ago

takeshiyu commented 9 months ago

Contributing a new country ?

  1. Create a new class in the Countries directory. It should extend the Country class.
  2. Add a test for the new country in the tests directory.
  3. Run the tests so a snapshot gets created.
  4. Verify the result in the newly created snapshot is correct.

Changes

  1. Added a new Taiwan class in the Holidays directory.
  2. Implemented holiday calculations specific to Taiwan, including both fixed-date holidays and those that require lunar calendar calculations.
  3. Used the ext-intl extension and IntlDateFormatter for accurate lunar calendar calculations, ensuring that holidays based on the lunar calendar are correctly determined.

Additional Notes

  1. The ext-intl extension is required for this addition. It is referenced in the composer.json file.

References

  1. https://publicholidays.tw/2024-dates/
Nielsvanpach commented 9 months ago

Thanks!