-
-
Notifications
You must be signed in to change notification settings - Fork 197
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 Holidays - Pakistan #19
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Could you rebase this branch, in order to run the tests here?
f870442
to
61366c5
Compare
@Nielsvanpach I do not understand the reason behind the failing action, can you help me with that? |
3f4a690
to
e7d7cc9
Compare
e7d7cc9
to
1b25080
Compare
/** @return array<string, CarbonImmutable> */ | ||
protected function variableHolidays(int $year): array | ||
{ | ||
// The variable holidays are all follow lunar calendar so their dates are not confirmed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can look at how Turkey solved this:
https://github.com/spatie/holidays/blob/main/src/Countries/Turkey.php#L11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the implementation, the solution provides the dates but there is no surety that the calendar will follow thsoe exact dates. Should I go for it anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't copy-paste the Turkey solution. But a similar approach can be done for Pakistan?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nielsvanpach I tried adapting the solution. The problem is, that we have 4 different sets of holidays that follow the lunar calendar(total of 10 holidays) and it is making the code a lot more complex and even after that, the dates will not be accurate.
Co-authored-by: Niels Vanpachtenbeke <[email protected]>
Dear contributor, because this pull request seems to be inactive for quite some time now, I've automatically closed it. If you feel this pull request deserves some attention from my human colleagues feel free to reopen it. |
Overview:
This pull request adds the country class for Pakistan. It lists the fixed federal holidays from the list here.
All the relevant test files are also added.