Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add National and Revolutionary Iran Holidays #146

Merged
merged 5 commits into from
Feb 1, 2024

Conversation

alisalehi1380
Copy link
Contributor

@alisalehi1380 alisalehi1380 commented Jan 20, 2024

test pass ✅

Screenshot 2024-01-20 154535

holiday names according to Wikipedia
Screenshot 2024-01-20 161858

Dates that are converted to solar are completely correct and usable. ✅
Screenshot 2024-01-20 172357

src/Countries/Iran.php Outdated Show resolved Hide resolved
src/Countries/Iran.php Outdated Show resolved Hide resolved
->setTimezone('Asia/Tehran');

return [
//add more holidays
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
We have 2 types of holidays in Iran.
In the first step (this PR) I added national and revolutionary holidays because these types of holidays are always fixed and do not change every year.

We(Iran) only share the Ramadan and Eid al-Ghadir holidays with Turkey. So, I'm adding "Religious (Islamic) holidays" to another PR because I need to double-check with the solar calendar.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Would it make sense to return Farsi(?) by default instead of English?
You can add translations here: https://github.com/spatie/holidays/tree/main/lang

Copy link
Contributor Author

@alisalehi1380 alisalehi1380 Feb 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Thank you for this. Return to Farsi language is much more useful for Farsi language users. ❤️
I applied this change.

tests/Countries/IranTest.php Outdated Show resolved Hide resolved
@alisalehi1380 alisalehi1380 changed the title Add Iran Holidays Add National and Revolutionary Iran Holidays Feb 1, 2024
$result = Holidays::for(country: 'ir', year: null, locale: $locale)->get();

expect($result)->toBeArray();
expect($result[7]['name'])->toBe($newYearsDayName);
Copy link
Contributor Author

@alisalehi1380 alisalehi1380 Feb 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose the 7th date of the holidays array because it is far from any political and ethnic front. 🤝

@alisalehi1380
Copy link
Contributor Author

Screenshot 2024-02-01 125549
all tests pass ✅

Copy link
Member

@Nielsvanpach Nielsvanpach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Nielsvanpach Nielsvanpach merged commit d99af11 into spatie:main Feb 1, 2024
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants