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

Albanian National Holidays #157

Merged
merged 8 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions src/Countries/Albania.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?php

namespace Spatie\Holidays\Countries;

use Carbon\CarbonImmutable;

class Albania extends Country
{
public function countryCode(): string
{
return 'al';
}

protected function allHolidays(int $year): array
{
return array_merge([
'Viti i Ri' => '01-01',
'Dita e Verës' => '03-14',
'Dita e Sulltan Nevruzit' => '03-22',
'Dita Ndërkombëtare e Punëtorëve' => '05-01',
'Dita e Shenjtërimit të Shenjt Terezës' => '09-05',
'Dita e Pavarësisë' => '11-28',
'Dita e Çlirimit' => '11-29',
'Dita Kombëtare e Rinisë' => '12-08',
'Krishtlindja' => '12-25',
], $this->variableHolidays($year));
}

/** @return array<string, CarbonImmutable|string> */
protected function variableHolidays(int $year): array
{
return array_filter([
'E diela e Pashkëve Katolike' => $this->easter($year),
'E diela e Pashkëve Ortodokse' => $this->orthodoxEaster($year),
'Dita e Bajramit të Madh' => $this->getEidAlFitrHoliday($year),
'Dita e Kurban Bajramit' => $this->getEidAlAdhaHoliday($year),
]);
}

/**
*
*/
private function getEidAlFitrHoliday(int $year): ?string
{
/**
* Provided until 2034 by qppstudio.net.
* https://www.qppstudio.net/global-holidays-observances/eid-al-fitr-end-of-ramadan.htm
*/
return match ($year) {
2024 => '04-10',
2025 => '03-30',
2026 => '03-20',
2027 => '03-09',
2028 => '02-26',
2029 => '02-14',
2030 => '02-04',
2031 => '01-24',
2032 => '01-14',
2033 => '01-02',
2034 => '12-12',
default => null // Holiday is variable; requires ongoing maintenance.
};
}

private function getEidAlAdhaHoliday(int $year): ?string
{
/**
* Tentative dates.
* Provided until 2034 by timeanddate.com.
* https://www.timeanddate.com/holidays/us/eid-al-adha
*/
return match ($year) {
2024 => '06-17',
2025 => '06-07',
2026 => '05-27',
2027 => '05-17',
2028 => '05-05',
2029 => '04-24',
2030 => '04-14',
2031 => '04-03',
2032 => '03-22',
2033 => '03-12',
2034 => '03-01',
default => null // Holiday is variable; requires ongoing maintenance.
};
}

}
15 changes: 15 additions & 0 deletions src/lang/albania/de/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Viti i Ri": "Neujahr",
"Dita e Verës": "Sommertag",
"Dita e Sulltan Nevruzit": "Tag des Sultan Nevruz",
"Dita Ndërkombëtare e Punëtorëve": "Tag der Arbeit",
"Dita e Shenjtërimit të Shenjt Terezës": "Tag der Heiligsprechung der Heiligen Teresa",
"Dita e Pavarësisë": "Unabhängigkeitstag",
"Dita e Çlirimit": "Befreiungstag",
"Dita Kombëtare e Rinisë": "Nationaler Jugendtag",
"Krishtlindja": "Weihnachten",
"E diela e Pashkëve Katolike": "Katholischer Ostersonntag",
"E diela e Pashkëve Ortodokse": "Orthodoxer Ostersonntag",
"Dita e Bajramit të Madh": "Eid al-Fitr",
"Dita e Kurban Bajramit": "Eid al-Adha"
}
15 changes: 15 additions & 0 deletions src/lang/albania/en/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Viti i Ri": "New Year's Day",
"Dita e Verës": "Summer Day",
"Dita e Sulltan Nevruzit": "Sultan Nevruz Day",
"Dita Ndërkombëtare e Punëtorëve": "International Workers' Day",
"Dita e Shenjtërimit të Shenjt Terezës": "Saint Teresa Canonization Day",
"Dita e Pavarësisë": "Independence Day",
"Dita e Çlirimit": "Liberation Day",
"Dita Kombëtare e Rinisë": "National Youth Day",
"Krishtlindja": "Christmas",
"E diela e Pashkëve Katolike": "Catholic Easter Sunday",
"E diela e Pashkëve Ortodokse": "Orthodox Easter Sunday",
"Dita e Bajramit të Madh": "Eid al-Fitr",
"Dita e Kurban Bajramit": "Eid al-Adha"
}
15 changes: 15 additions & 0 deletions src/lang/albania/es/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Viti i Ri": "Año Nuevo",
"Dita e Verës": "Día del Verano",
"Dita e Sulltan Nevruzit": "Día del Sultan Nevruz",
"Dita Ndërkombëtare e Punëtorëve": "Día Internacional de los Trabajadores",
"Dita e Shenjtërimit të Shenjt Terezës": "Día de la Canonización de Santa Teresa",
"Dita e Pavarësisë": "Día de la Independencia",
"Dita e Çlirimit": "Día de la Liberación",
"Dita Kombëtare e Rinisë": "Día Nacional de la Juventud",
"Krishtlindja": "Navidad",
"E diela e Pashkëve Katolike": "Domingo de Pascua Católica",
"E diela e Pashkëve Ortodokse": "Domingo de Pascua Ortodoxa",
"Dita e Bajramit të Madh": "Eid al-Fitr",
"Dita e Kurban Bajramit": "Eid al-Adha"
}
16 changes: 16 additions & 0 deletions src/lang/albania/fr/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"Viti i Ri": "Jour de l'An",
"Dita e Verës": "Jour de l'Été",
"Dita e Sulltan Nevruzit": "Jour du Sultan Nevruz",
"Dita Ndërkombëtare e Punëtorëve": "Fête du Travail",
"Dita e Shenjtërimit të Shenjt Terezës": "Jour de la Canonisation de Sainte Teresa",
"Dita e Pavarësisë": "Jour de l'Indépendance",
"Dita e Çlirimit": "Jour de la Libération",
"Dita Kombëtare e Rinisë": "Journée nationale de la jeunesse",
"Krishtlindja": "Noël",
"E diela e Pashkëve Katolike": "Dimanche de Pâques catholique",
"E diela e Pashkëve Ortodokse": "Dimanche de Pâques orthodoxe",
"Dita e Bajramit të Madh": "Aïd al-Fitr",
"Dita e Kurban Bajramit": "Aïd al-Adha"
}

15 changes: 15 additions & 0 deletions src/lang/albania/gr/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Viti i Ri": "Πρωτοχρονιά (Protochroniá)",
"Dita e Verës": "Ημέρα του Καλοκαιριού (Iméra tou Kalokairioú)",
"Dita e Sulltan Nevruzit": "Ημέρα του Σουλτάν Nevruz (Iméra tou Soúltan Nevruz)",
"Dita Ndërkombëtare e Punëtorëve": "Διεθνής Ημέρα των Εργαζομένων (Diethnís Iméra ton Ergazoménon)",
"Dita e Shenjtërimit të Shenjt Terezës": "Ημέρα Κανονισμού της Αγίας Τερέζας (Iméra Kanonismoú tis Agías Terézas)",
"Dita e Pavarësisë": "Ημέρα Ανεξαρτησίας (Iméra Anexartisías)",
"Dita e Çlirimit": "Ημέρα Απελευθέρωσης (Iméra Apelafthéroses)",
"Dita Kombëtare e Rinisë": "Εθνική Ημέρα της Νεολαίας (Ethnikí Iméra tis Neoléas)",
"Krishtlindja": "Χριστούγεννα (Christoúgenna)",
"E diela e Pashkëve Katolike": "Κυριακή του Καθολικού Πάσχα (Kyriakí tou Katholikoú Páscha)",
"E diela e Pashkëve Ortodokse": "Κυριακή του Ορθόδοξου Πάσχα (Kyriakí tou Orthódoksi Páscha)",
"Dita e Bajramit të Madh": "Ημέρα του Μεγάλου Βαϊράμ (Iméra tou Megálou Vaïrám)",
"Dita e Kurban Bajramit": "Ημέρα του Κουρμπάν Βαϊράμ (Iméra tou Kourbán Vaïrám)"
}
15 changes: 15 additions & 0 deletions src/lang/albania/it/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Viti i Ri": "Capodanno",
"Dita e Verës": "Giorno d'Estate",
"Dita e Sulltan Nevruzit": "Giorno del Sultano Nevruz",
"Dita Ndërkombëtare e Punëtorëve": "Festa dei Lavoratori",
"Dita e Shenjtërimit të Shenjt Terezës": "Giorno della Canonizzazione di Santa Teresa",
"Dita e Pavarësisë": "Giorno dell'Indipendenza",
"Dita e Çlirimit": "Giorno della Liberazione",
"Dita Kombëtare e Rinisë": "Giornata Nazionale della Gioventù",
"Krishtlindja": "Natale",
"E diela e Pashkëve Katolike": "Domenica di Pasqua Cattolica",
"E diela e Pashkëve Ortodokse": "Domenica di Pasqua Ortodossa",
"Dita e Bajramit të Madh": "Eid al-Fitr",
"Dita e Kurban Bajramit": "Eid al-Adha"
}
15 changes: 15 additions & 0 deletions src/lang/albania/pt/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Viti i Ri": "Ano Novo",
"Dita e Verës": "Dia do Verão",
"Dita e Sulltan Nevruzit": "Dia do Sultão Nevruz",
"Dita Ndërkombëtare e Punëtorëve": "Dia Internacional dos Trabalhadores",
"Dita e Shenjtërimit të Shenjt Terezës": "Dia da Canonização de Santa Teresa",
"Dita e Pavarësisë": "Dia da Independência",
"Dita e Çlirimit": "Dia da Libertação",
"Dita Kombëtare e Rinisë": "Dia Nacional da Juventude",
"Krishtlindja": "Natal",
"E diela e Pashkëve Katolike": "Domingo de Páscoa Católico",
"E diela e Pashkëve Ortodokse": "Domingo de Páscoa Ortodoxo",
"Dita e Bajramit të Madh": "Eid al-Fitr",
"Dita e Kurban Bajramit": "Eid al-Adha"
}
15 changes: 15 additions & 0 deletions src/lang/albania/ru/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Viti i Ri": "Новий рік",
"Dita e Verës": "День літа",
"Dita e Sulltan Nevruzit": "День Султана Невруза",
"Dita Ndërkombëtare e Punëtorëve": "Міжнародний день праці",
"Dita e Shenjtërimit të Shenjt Terezës": "День канонізації Святої Терези",
"Dita e Pavarësisë": "День Незалежності",
"Dita e Çlirimit": "День Визволення",
"Dita Kombëtare e Rinisë": "Національний день молоді",
"Krishtlindja": "Різдво",
"E diela e Pashkëve Katolike": "Католицька неділя Великодня",
"E diela e Pashkëve Ortodokse": "Православна неділя Великодня",
"Dita e Bajramit të Madh": "Байрам",
"Dita e Kurban Bajramit": "Курбан-байрам"
}
15 changes: 15 additions & 0 deletions src/lang/albania/tr/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Viti i Ri": "Yılbaşı",
"Dita e Verës": "Yaz Günü",
"Dita e Sulltan Nevruzit": "Sultan Nevruz Günü",
"Dita Ndërkombëtare e Punëtorëve": "Uluslararası İşçi Günü",
"Dita e Shenjtërimit të Shenjt Terezës": "Azize Teresa'nın Kanonizasyon Günü",
"Dita e Pavarësisë": "Bağımsızlık Günü",
"Dita e Çlirimit": "Kurtuluş Günü",
"Dita Kombëtare e Rinisë": "Ulusal Gençlik Günü",
"Krishtlindja": "Noel",
"E diela e Pashkëve Katolike": "Katolik Paskalya Pazarı",
"E diela e Pashkëve Ortodokse": "Ortodoks Paskalya Pazarı",
"Dita e Bajramit të Madh": "Ramazan Bayramı",
"Dita e Kurban Bajramit": "Kurban Bayramı"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[
{
"name": "Viti i Ri",
"date": "2024-01-01"
},
{
"name": "Dita e Ver\u00ebs",
"date": "2024-03-14"
},
{
"name": "Dita e Sulltan Nevruzit",
"date": "2024-03-22"
},
{
"name": "E diela e Pashk\u00ebve Katolike",
"date": "2024-03-31"
},
{
"name": "Dita e Bajramit t\u00eb Madh",
"date": "2024-04-10"
},
{
"name": "Dita Nd\u00ebrkomb\u00ebtare e Pun\u00ebtor\u00ebve",
"date": "2024-05-01"
},
{
"name": "E diela e Pashk\u00ebve Ortodokse",
"date": "2024-05-05"
},
{
"name": "Dita e Kurban Bajramit",
"date": "2024-06-17"
},
{
"name": "Dita e Shenjt\u00ebrimit t\u00eb Shenjt Terez\u00ebs",
"date": "2024-09-05"
},
{
"name": "Dita e Pavar\u00ebsis\u00eb",
"date": "2024-11-28"
},
{
"name": "Dita e \u00c7lirimit",
"date": "2024-11-29"
},
{
"name": "Dita Komb\u00ebtare e Rinis\u00eb",
"date": "2024-12-08"
},
{
"name": "Krishtlindja",
"date": "2024-12-25"
}
]
Loading