generated from spatie/package-skeleton-php
-
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into Syria-holidays
- Loading branch information
Showing
78 changed files
with
2,276 additions
and
662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"Yeni il": "New year", | ||
"Beynəlxalq Qadınlar günü": "International Women's Day", | ||
"Novruz bayramı": "Novruz holiday", | ||
"Faşizm üzərində qələbə günü": "Day of Victory over fascism", | ||
"Müstəqillik Günü": "Independence Day", | ||
"Azərbaycan xalqının milli qurtuluş günü": "National Salvation Day of the Azerbaijani people", | ||
"Azərbaycan Respublikasının Silahlı Qüvvələri günü": "Day of Armed Forces of the Republic of Azerbaijan", | ||
"Müstəqilliyin bərpası günü": "Day of Restoration of Independence", | ||
"Zəfər Günü": "Victory Day", | ||
"Azərbaycan Respublikasının Dövlət bayrağı günü": "National Flag Day of the Republic of Azerbaijan", | ||
"Dünya azərbaycanlılarının həmrəyliyi günü": "World Azerbaijanis Solidarity Day" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,33 @@ | ||
{ | ||
"New Year\n's Day": "يوم رأس السنة", | ||
"Coptic Christmas": "عيد الميلاد القبطي", | ||
"Revolution Day January 25": "عيد ثورة 25 يناير", | ||
"New Year\\'s Day": "رأس السنة الميلادية", | ||
"Coptic Christmas Day": "عيد الميلاد المجيد", | ||
"Revolution Day 2011": "ثورة ٢٥ يناير وعيد الشرطة", | ||
"March Equinox": "اعتدال مارس", | ||
"Sinai Liberation": "تحرير سيناء", | ||
"Labor": "العمل", | ||
"Coptic Good": "الصالح القبطي", | ||
"Coptic Holy": "المقدس القبطي", | ||
"Coptic Easter": "عيد الفصح القبطي", | ||
"Spring Festival": "مهرجان الربيع", | ||
"June Solstice": "انقلاب يونيو", | ||
"June 30 Revolution": "ثورة 30 يونيو", | ||
"Day off for June 30 Revolution": "يوم عطلة بمناسبة ثورة 30 يونيو", | ||
"Revolution Day July 23": "عيد ثورة 23 يوليو", | ||
"Day off for Revolution Day July 23": "يوم عطلة بمناسبة عيد ثورة 23 يوليو", | ||
"Sinai Liberation Day": "عيد تحرير سيناء (٢٥ أبريل ١٩٨٢)", | ||
"Labour Day": "عيد العمال", | ||
"Coptic Good Friday": "الصالح القبطي", | ||
"Coptic Holy Saturday": "المقدس القبطي", | ||
"Coptic Easter Sunday": "عيد الفصح القبطي", | ||
"Spring Festival": "عيد شم النسيم", | ||
"June Solstice": "الانقلاب الشمسي في يونيو", | ||
"June 30 Revolution Day": "عيد ثورة 30 يونيو", | ||
"Day off for June 30 Revolution Day": "بمناسبة عيد ثورة 30 يونيو", | ||
"Revolution Day": "عيد ثورة 23 يوليو", | ||
"Day off for Revolution Day": "بمناسبة عيد ثورة 23 يوليو", | ||
"Flooding of the Nile": "فيضان النيل", | ||
"Nayrouz": "النيروز", | ||
"September Equinox": "الاعتدال في سبتمبر", | ||
"Armed Forces": "القوات المسلحة", | ||
"Day off for Armed Forces": "يوم عطلة للقوات المسلحة", | ||
"December Solstice": "الانقلاب الشمسي في ديسمبر" | ||
} | ||
"Armed Forces Day": "عيد القوات المسلحة (٦ أكتوبر ١٩٧٣)", | ||
"Day off for Armed Forces Day": "يوم عطلة للقوات المسلحة", | ||
"December Solstice": "الانقلاب الشمسي في ديسمبر", | ||
"Eid al-Fitr": "عيد الفطر المبارك", | ||
"Eid al-Fitr Day 2": "عيد الفطر المبارك", | ||
"Eid al-Fitr Day 3": "عيد الفطر المبارك", | ||
"Eid al-Adha": "عيد الأضحى المبارك", | ||
"Eid al-Adha Day 2": "عيد الأضحى المبارك", | ||
"Eid al-Adha Day 3": "عيد الأضحى المبارك", | ||
"Eid al-Adha Day 4": "عيد الأضحى المبارك", | ||
"Islamic New Year": "رأس السنة الهجرية", | ||
"Birthday of the Prophet Muhammad": "المولد النبوي الشريف", | ||
"Arafat Day": "يوم عرفة (وقفة عيد الأضحى)" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"New Year\\'s Day": "New Year\\'s Day", | ||
"Coptic Christmas Day": "Coptic Christmas Day", | ||
"Revolution Day 2011": "Revolution Day 2011", | ||
"March Equinox": "March Equinox", | ||
"Sinai Liberation Day": "Sinai Liberation Day", | ||
"Labour Day": "Labour Day", | ||
"Coptic Good Friday": "Coptic Good Friday", | ||
"Coptic Holy Saturday": "Coptic Holy Saturday", | ||
"Coptic Easter Sunday": "Coptic Easter Sunday", | ||
"Spring Festival": "Spring Festival", | ||
"June Solstice": "June Solstice", | ||
"June 30 Revolution Day": "June 30 Revolution Day", | ||
"Day off for June 30 Revolution Day": "Day off for June 30 Revolution Day", | ||
"Revolution Day": "Revolution Day", | ||
"Day off for Revolution Day": "Day off for Revolution Day", | ||
"Flooding of the Nile": "Flooding of the Nile", | ||
"Nayrouz": "Nayrouz", | ||
"September Equinox": "September Equinox", | ||
"Armed Forces Day": "Armed Forces Day", | ||
"Day off for Armed Forces Day": "Day off for Armed Forces", | ||
"December Solstice": "December Solstice", | ||
"Eid al-Fitr": "Eid al-Fitr", | ||
"Eid al-Fitr Day 2": "Eid al-Fitr", | ||
"Eid al-Fitr Day 3": "Eid al-Fitr", | ||
"Eid al-Adha": "Eid al-Adha", | ||
"Eid al-Adha Day 2": "Eid al-Adha", | ||
"Eid al-Adha Day 3": "Eid al-Adha", | ||
"Eid al-Adha Day 4": "Eid al-Adha", | ||
"Islamic New Year": "Islamic New Year (Muharram)", | ||
"Birthday of the Prophet Muhammad": "Birthday of the Prophet Muhammad", | ||
"Arafat Day": "Arafat Day", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"New Year\n's Day": "يوم رأس السنة", | ||
"Mother\n's Day": "عيد الأم", | ||
"Teacher\n's Day": "عيد المعلم", | ||
"Western Easter": "عيد الفصح الغربي", | ||
"Eid al-Fitr": "عيد الفطر السعيد", | ||
"Syrian Independence Day": "عيد الجلاء واستقلال سورية", | ||
"Labor Day": "عيد العمال", | ||
"Eastern Easter": "عيد الفصح الشرقي", | ||
"Martyrs\n' Day": "عيد الشهداء", | ||
"Eid al-Adha": "عيد الأضحى المبارك", | ||
"Islamic New Year": "عيد رأس السنة الهجرية", | ||
"The commemoration of the birth of the Prophet Muhammad": "عيد مولد الرسول الأعظم", | ||
"The October Liberation War": "ذكرى حرب تشرين التحريرية", | ||
"Merry Christmas": "عيد الميلاد المجيد" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"Yangi yil": "New year", | ||
"Xalqaro xotin-qizlar kuni": "International Women's Day", | ||
"Navro'z": "Nowruz", | ||
"Xotira va qadrlash kuni": "Remembrance Day", | ||
"Mustaqillik kuni": "Independence Day", | ||
"Ustoz va murabbiylar kuni": "Teachers Day", | ||
"Konstitutsiya kuni": "Constitution Day", | ||
"Ramazon Hayiti": "Eid al-Fitr", | ||
"Qurbon Hayiti": "Eid al-Adha", | ||
"Ramazon Hayiti 2": "Eid al-Fitr", | ||
"Qurbon Hayiti 2": "Eid al-Adha" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"Yangi yil": "Новый год", | ||
"Xalqaro xotin-qizlar kuni": "Международный женский день", | ||
"Navro'z": "Навруз", | ||
"Xotira va qadrlash kuni": "День памяти и почестей", | ||
"Mustaqillik kuni": "День Независимости", | ||
"Ustoz va murabbiylar kuni": "День учителя", | ||
"Konstitutsiya kuni": "День Конституции", | ||
"Ramazon Hayiti": "Рамазан Хаит", | ||
"Qurbon Hayiti": "Курбан Хаит", | ||
"Ramazon Hayiti 2": "Рамазан Хаит", | ||
"Qurbon Hayiti 2": "Курбан Хаит" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
|
||
namespace Spatie\Holidays\Concerns; | ||
|
||
use Carbon\CarbonImmutable; | ||
use Carbon\CarbonInterface; | ||
|
||
trait Observable | ||
{ | ||
protected function weekendToNextMonday(string|CarbonInterface $date, int $year): ?CarbonInterface | ||
{ | ||
if (is_string($date)) { | ||
$date = CarbonImmutable::createFromFormat('Y-m-d', "{$year}-{$date}")->startOfDay(); | ||
} | ||
|
||
if ($date->isWeekend()) { | ||
return $date->next('monday'); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
protected function sundayToNextMonday(string|CarbonInterface $date, int $year): ?CarbonInterface | ||
{ | ||
if (is_string($date)) { | ||
$date = CarbonImmutable::createFromFormat('Y-m-d', "{$year}-{$date}")->startOfDay(); | ||
} | ||
|
||
if ($date->isSunday()) { | ||
return $date->next('monday'); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
protected function observedChristmasDay(int $year): ?CarbonInterface | ||
{ | ||
$christmasDay = (new CarbonImmutable($year.'-12-25'))->startOfDay(); | ||
|
||
return match ($christmasDay->dayName) { | ||
'Saturday' => $christmasDay->next('monday'), | ||
'Sunday' => $christmasDay->next('tuesday'), | ||
default => null, | ||
}; | ||
} | ||
|
||
protected function observedBoxingDay(int $year): ?CarbonInterface | ||
{ | ||
$christmasDay = (new CarbonImmutable($year.'-12-25'))->startOfDay(); | ||
$boxingDay = $christmasDay->addDay(); | ||
|
||
return match ($christmasDay->dayName) { | ||
'Friday' => $boxingDay->next('monday'), | ||
'Saturday' => $boxingDay->next('tuesday'), | ||
default => null, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.