azuyalabs / yasumi

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

Updated SouthKorea provider to apply the new substitute holidays changed in June 2021. #255

Closed barami closed 3 years ago

barami commented 3 years ago

Hi. The new substitute holidays bill was passed in korea on june 2021. I have updated SouthKorea provider and added tests for substitute holidays.

  1. All statutory holidays overlaping weekend or other holiday will be substitute at next working day.
  2. The above provisions shall be in force in 2022, but substitute holidays of second half of 2021 shall be applied by the supplementary provision.

https://en.yna.co.kr/view/AEN20210629007500315 http://tbs.seoul.kr/eFm/newsView.do?typ_800=N&idx_800=3441140&seq_800=

stelgenhof commented 3 years ago

Super! Thanks so much.

barami commented 3 years ago

We should postpone merging this pr until complete the selection of substitute holiday. According to the bill, holidays allowed to substitute is designated by Presidential Decree. But, The Korean government said it will apply alternative holidays only on some public holidays, not all public holidays on July 15.

barami commented 3 years ago

http://www.koreaherald.com/view.php?ud=20210803000365 The revised public holiday presidential decree came into force on August 4. The new commits change rules for substitution accordingly.

barami commented 3 years ago

@stelgenhof Static snalysis is always failed for Yasumi/Yasumi.php. Even fork upstream to another repository and run actions, it was failed. I don't know that how to fix it.

stelgenhof commented 3 years ago

@barami I am aware of the CI failing. Some issue in the core files causing this. I will have a look.

stelgenhof commented 3 years ago

@barami I've fixed the issues with the CI. Please update your branch. Thanks!

stelgenhof commented 3 years ago

The ChildrensDayTest class seems to be altered with Buddha's Birthday. Is that correct?

stelgenhof commented 3 years ago

@barami Can you also update the CHANGELOG.md file (on the top) that explains the this PR (in non-technical terms as much as possible). Thanks!

barami commented 3 years ago

@stelgenhof Yes. Children's Day and Buddha's birthday often overlap, so it is necessary to test alternative holidays when two holidays overlap. In addition, National foundation day and Chuseok also sometimes overlap with each other, so I wrote the test.

Also, I will update CHANGELOG.md as you say.