Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
inDeev authored May 3, 2024
2 parents 621e191 + b7ef716 commit 5600d84
Show file tree
Hide file tree
Showing 214 changed files with 9,286 additions and 415 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
uses: dependabot/fetch-metadata@v2.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Fix PHP code style issues

on: [push, pull_request]
on: [push]

permissions:
contents: write
Expand All @@ -17,7 +17,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@2.3.1
uses: aglipanci/laravel-pint-action@2.4

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.1'
coverage: none

- name: Install composer dependencies
Expand All @@ -21,4 +21,4 @@ jobs:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
run: ./vendor/bin/phpstan
9 changes: 6 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.3, 8.2, 8.1]
stability: [prefer-lowest, prefer-stable]
carbon: [2.72, 3.2]

name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
name: P${{ matrix.php }} - ${{ matrix.stability }} - Carbon ${{ matrix.carbon }}

steps:
- name: Checkout code
Expand All @@ -32,7 +33,9 @@ jobs:
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
run: |
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
composer require nesbot/carbon:^${{ matrix.carbon }} --${{ matrix.stability }} -W --prefer-dist --no-interaction
- name: List Installed Dependencies
run: composer show -D
Expand Down
176 changes: 176 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,182 @@

All notable changes to `holidays` will be documented in this file.

## 1.10.0 - 2024-04-29

### What's Changed

* add Tunisia Holidays by @mr-wolf-gb in https://github.com/spatie/holidays/pull/109
* Add holidays for Ecuador by @insoutt in https://github.com/spatie/holidays/pull/218
* Bump aglipanci/laravel-pint-action from 2.3.1 to 2.4 by @dependabot in https://github.com/spatie/holidays/pull/221
* feat: remove canceled day of the rest from `Slovakia` country by @patressz in https://github.com/spatie/holidays/pull/223

### New Contributors

* @mr-wolf-gb made their first contribution in https://github.com/spatie/holidays/pull/109
* @insoutt made their first contribution in https://github.com/spatie/holidays/pull/218

**Full Changelog**: https://github.com/spatie/holidays/compare/1.9.1...1.10.0

## 1.9.1 - 2024-04-02

### What's Changed

* Bump dependabot/fetch-metadata from 1.6.0 to 2.0.0 by @dependabot in https://github.com/spatie/holidays/pull/215
* Fix the Holidays in French speaking Switzerland by @OlinB in https://github.com/spatie/holidays/pull/217

### New Contributors

* @dependabot made their first contribution in https://github.com/spatie/holidays/pull/215
* @OlinB made their first contribution in https://github.com/spatie/holidays/pull/217

**Full Changelog**: https://github.com/spatie/holidays/compare/1.9.0...1.9.1

## 1.9.0 - 2024-03-22

### What's Changed

* Implement Islamic calendar by @Nielsvanpach in https://github.com/spatie/holidays/pull/214
* Add holidays for Bosnia And Herzegovina by @DesaBL in https://github.com/spatie/holidays/pull/203

### New Contributors

* @DesaBL made their first contribution in https://github.com/spatie/holidays/pull/203

**Full Changelog**: https://github.com/spatie/holidays/compare/1.8.0...1.9.0

## 1.8.0 - 2024-03-08

### What's Changed

* Adding holidays for Bahrain by @bo3bdo in https://github.com/spatie/holidays/pull/206
* Add default locale by @Nielsvanpach in https://github.com/spatie/holidays/pull/208
* Fix: Canada Victoria Day correction in test and calculation by @mercury64 in https://github.com/spatie/holidays/pull/211

### New Contributors

* @bo3bdo made their first contribution in https://github.com/spatie/holidays/pull/206
* @mercury64 made their first contribution in https://github.com/spatie/holidays/pull/211

**Full Changelog**: https://github.com/spatie/holidays/compare/1.7.0...1.8.0

## 1.7.0 - 2024-02-08

### What's Changed

* Add Uzbekistan Holidays by @shoxrux1996 in https://github.com/spatie/holidays/pull/81
* Add Azerbaijan holidays by @kenanaga in https://github.com/spatie/holidays/pull/166
* Enhanced holiday dates in Ghana by @Ikpeba4ll in https://github.com/spatie/holidays/pull/80
* Adding holidays for syria by @abdulrhmanak213 in https://github.com/spatie/holidays/pull/201

### New Contributors

* @shoxrux1996 made their first contribution in https://github.com/spatie/holidays/pull/81
* @kenanaga made their first contribution in https://github.com/spatie/holidays/pull/166
* @Ikpeba4ll made their first contribution in https://github.com/spatie/holidays/pull/80
* @abdulrhmanak213 made their first contribution in https://github.com/spatie/holidays/pull/201

**Full Changelog**: https://github.com/spatie/holidays/compare/1.6.1...1.7.0

## 1.6.1 - 2024-02-07

### What's Changed

* Fixes for Egyptian holidays by @wessama in https://github.com/spatie/holidays/pull/155

### New Contributors

* @wessama made their first contribution in https://github.com/spatie/holidays/pull/155

**Full Changelog**: https://github.com/spatie/holidays/compare/1.6.0...1.6.1

## 1.6.0 - 2024-02-07

### What's Changed

* Add holidays for Argentine by @damian-developer in https://github.com/spatie/holidays/pull/200
* Add Spanish Holidays by @jaltez in https://github.com/spatie/holidays/pull/34
* Add support for Carbon v3 by @Nielsvanpach in https://github.com/spatie/holidays/pull/204

### New Contributors

* @damian-developer made their first contribution in https://github.com/spatie/holidays/pull/200
* @jaltez made their first contribution in https://github.com/spatie/holidays/pull/34

**Full Changelog**: https://github.com/spatie/holidays/compare/1.5.1...1.6.0

## 1.5.1 - 2024-02-01

Fix translations for Albania & Iran

**Full Changelog**: https://github.com/spatie/holidays/compare/1.5.0...1.5.1

## 1.5.0 - 2024-02-01

### What's Changed

* Fix Danish Easter dates offset by @danielboendergaard in https://github.com/spatie/holidays/pull/197
* Albanian National Holidays by @MirilTerolli in https://github.com/spatie/holidays/pull/157
* Add holidays for Jamaica by @oraneedwards in https://github.com/spatie/holidays/pull/185
* Add public holidays for Ghana by @petersowah in https://github.com/spatie/holidays/pull/175
* Support for Slovenian language second PR after rebase problem by @juref in https://github.com/spatie/holidays/pull/139
* Add Moldavian Holidays by @vkosachev in https://github.com/spatie/holidays/pull/95
* Add `Egypt` Holidays by @michaelnabil230 in https://github.com/spatie/holidays/pull/35
* add myanmar holidays by @yethusoe91 in https://github.com/spatie/holidays/pull/29
* Added support for holidays in Nigeria by @cybernerdie in https://github.com/spatie/holidays/pull/10
* Add support for Swedish holidays by @adevade in https://github.com/spatie/holidays/pull/199
* Add National and Revolutionary Iran Holidays by @alisalehi1380 in https://github.com/spatie/holidays/pull/146

### New Contributors

* @danielboendergaard made their first contribution in https://github.com/spatie/holidays/pull/197
* @MirilTerolli made their first contribution in https://github.com/spatie/holidays/pull/157
* @oraneedwards made their first contribution in https://github.com/spatie/holidays/pull/185
* @petersowah made their first contribution in https://github.com/spatie/holidays/pull/175
* @juref made their first contribution in https://github.com/spatie/holidays/pull/139
* @vkosachev made their first contribution in https://github.com/spatie/holidays/pull/95
* @michaelnabil230 made their first contribution in https://github.com/spatie/holidays/pull/35
* @yethusoe91 made their first contribution in https://github.com/spatie/holidays/pull/29
* @adevade made their first contribution in https://github.com/spatie/holidays/pull/199
* @alisalehi1380 made their first contribution in https://github.com/spatie/holidays/pull/146

**Full Changelog**: https://github.com/spatie/holidays/compare/1.4.0...1.5.0

## 1.4.0 - 2024-01-30

### What's Changed

* Add Montenegro holidays by @Rkishahaha in https://github.com/spatie/holidays/pull/171
* Add Angola Holidays by @monteirofutila in https://github.com/spatie/holidays/pull/89
* add wales, england, scotland and northern ireland by @SimonBarrettACT in https://github.com/spatie/holidays/pull/162
* Add Chile Holidays by @AndresReyesDev in https://github.com/spatie/holidays/pull/88
* Added Kenyan holidays by @PhilN8 in https://github.com/spatie/holidays/pull/69
* Add vietnamese holidays by @kevinb1989 in https://github.com/spatie/holidays/pull/115
* Germany: Adding local for EN, FR, NL by @arnebr in https://github.com/spatie/holidays/pull/183
* Support for Taiwan holidays by @takeshiyu in https://github.com/spatie/holidays/pull/124
* Fixing README.md to update region parameter in country constructor to a working example by @arnebr in https://github.com/spatie/holidays/pull/184
* Draft: Add Support for Switzerland by @Martin-Welte in https://github.com/spatie/holidays/pull/49
* Add Tanzania national holiday by @alphaolomi in https://github.com/spatie/holidays/pull/98
* Switzerland: add missing holidays to "ch-ur" region by @Kenny1291 in https://github.com/spatie/holidays/pull/191
* Germany: Setting some historical holidays by @arnebr in https://github.com/spatie/holidays/pull/188
* feat: Add Bangla language support for Bangladeshi holidays by @jfBiswajit in https://github.com/spatie/holidays/pull/182
* add indonesia holiday by @ddouble-d in https://github.com/spatie/holidays/pull/66

### New Contributors

* @Rkishahaha made their first contribution in https://github.com/spatie/holidays/pull/171
* @monteirofutila made their first contribution in https://github.com/spatie/holidays/pull/89
* @SimonBarrettACT made their first contribution in https://github.com/spatie/holidays/pull/162
* @AndresReyesDev made their first contribution in https://github.com/spatie/holidays/pull/88
* @PhilN8 made their first contribution in https://github.com/spatie/holidays/pull/69
* @kevinb1989 made their first contribution in https://github.com/spatie/holidays/pull/115
* @takeshiyu made their first contribution in https://github.com/spatie/holidays/pull/124
* @alphaolomi made their first contribution in https://github.com/spatie/holidays/pull/98
* @Kenny1291 made their first contribution in https://github.com/spatie/holidays/pull/191
* @jfBiswajit made their first contribution in https://github.com/spatie/holidays/pull/182
* @ddouble-d made their first contribution in https://github.com/spatie/holidays/pull/66

**Full Changelog**: https://github.com/spatie/holidays/compare/1.3.0...1.4.0

## 1.3.0 - 2024-01-25

### What's Changed
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,9 @@ Holidays::has('be'); // true
Holidays::has('unknown'); // false
```

### Package limitations
1. Islamic holidays are not supported (yet)

## Contributing

This is a community driven package. If you find any errors, please create an issue or a pull request.
This is a community driven package. If you find any errors, please create a pull request with the fix, or at least open an issue.

## Adding a new country

Expand All @@ -136,13 +133,13 @@ In case your country has specific rules for calculating holidays,
for example region specific holidays, you can pass this to the constructor of your country class.

```php
$holidays = Holidays::for(Austria::make(region: 'de-bw'))->get();
$holidays = Holidays::for(Germany::make(region: 'DE-BW'))->get();
```

The value, `de-bw`, will be passed to the region parameter of the constructor of a country.
The value, `DE-BW`, will be passed to the region parameter of the constructor of a country.

```php
class Austria extends Country
class Germany extends Country
{
protected function __construct(
protected ?string $region = null,
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
],
"require": {
"php": "^8.1",
"nesbot/carbon": "^2.72.1",
"ext-calendar": "*"
"ext-intl": "*",
"ext-calendar": "*",
"nesbot/carbon": "^2.72.1|^3.0"
},
"require-dev": {
"laravel/pint": "^1.0",
Expand All @@ -46,7 +47,7 @@
"scripts": {
"analyse": "vendor/bin/phpstan analyse",
"baseline": "vendor/bin/phpstan analyse --generate-baseline",
"test": "vendor/bin/pest",
"test": "vendor/bin/pest --compact",
"test-coverage": "vendor/bin/pest --coverage",
"format": "vendor/bin/pint"
},
Expand Down
15 changes: 15 additions & 0 deletions 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 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 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 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 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)"
}
Loading

0 comments on commit 5600d84

Please sign in to comment.