-
-
Notifications
You must be signed in to change notification settings - Fork 199
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 Jordan holidays #209
Add Jordan holidays #209
Conversation
|
||
return [ | ||
|
||
'jo' => [ |
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.
Can you use class consts for this? Have a look at Egypt or Bahrain
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
Why I used this approach:
- It's hard to read around 200 lines of code to read the elements.
- in some countries the holidays are shared or in the same region.
- at the end the Islamic directory is loadable.
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.
2 and 3 seem valid points.
Although, using jo
as a key doesn't feel like the way to go for being shareable across countries?
Also, if you have a look at Turkey, I prefer that format. What the benefit of using the extra date
key?
Also, for multiday holidays it's possible to have it twice in a single year:
1999 => '01-19',
2000 => [
'01-08',
'12-27',
],
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.
jo
it may change,
date
is more readable,
The third note is valid.
|
||
use Carbon\CarbonImmutable; | ||
|
||
trait IslamicHolidays |
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.
We already have an IslamicCalendar trait which you can use
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.
This trait depends on the constants variable and I explained the issue in the above replay.
use Carbon\CarbonPeriod; | ||
use Carbon\CarbonImmutable; | ||
|
||
trait WeekendHolidays |
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 think the Observable trait is what you need
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. |
Contributing a new country ?