holidays icon indicating copy to clipboard operation
holidays copied to clipboard

[feat] implement iran holidays

Open aryala7 opened this issue 1 year ago • 2 comments

Contributing a new country ?

  • [x] Have you checked to ensure there aren't other open Pull Requests for the same 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.

aryala7 avatar Jan 19 '24 13:01 aryala7

@alisalehi1380 thanks for your review

aryala7 avatar Jan 20 '24 13:01 aryala7

And the last point, because the main Iranian calendar is the Solar Hijri calendar, using the dates listed in Wikipedia (according to the Gregorian calendar) is limited and has a delay of one day. For this reason, we have to change these dates so that when we convert to the solar date, it is correct. Unfortunately, when the output of your code in the verta package (one of the most famous date conversion packages) is used to convert to solar date, the displayed date is not correct!

Left my code and Right your code. Screenshot 2024-01-20 13241a2 As this picture shows, only 3 of the Gregorian dates on Wikipedia are correct and useful!

I have taken the time to find all these issues and fixed them in my pull request. #146 I would like to participate in this project. Do as you see fit. @Nielsvanpach

Regards, Ali Salehi

alisalehi1380 avatar Jan 20 '24 13:01 alisalehi1380

@alisalehi1380 Are you sure you checked these dates with the latest version of my changes because this problem has been fixed in the latest version

aryala7 avatar Jan 21 '24 06:01 aryala7

@aryala7 Yes, I've solved it in the pull request! 😊

alisalehi1380 avatar Jan 21 '24 09:01 alisalehi1380

Merged another PR for Iran. Feel free to open a new PR with needed changes! Thanks.

Nielsvanpach avatar Feb 01 '24 09:02 Nielsvanpach