diff --git a/CHANGELOG.md b/CHANGELOG.md index fe1929ada..fe0467a9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Code using class imports rather than Fully Qualified Class names. - Upgraded to PHPUnit 8. - Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider are given by a new exception for each of these two situations separately ('InvalidYearException' and 'ProviderNotFoundException'). This allows you to better distinguish which exception may occur when instantiating the Yasumi class. [\#95](https://github.com/azuyalabs/yasumi/pull/95) ([qneyrat](https://github.com/qneyrat)) +- Fallback support added to getName() to allow e.g. fallback from 'de_AT' to 'de'. [\#176](https://github.com/azuyalabs/yasumi/pull/176) ([c960657](https://github.com/c960657)) ### Fixed - Late Summer Bank Holiday in 1968 and 1969 in United Kingdom [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 9408f77a6..b72ead506 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -160,7 +160,19 @@ public function jsonSerialize(): self */ public function getName(): string { - return $this->translations[$this->displayLocale] ?? $this->translations[self::DEFAULT_LOCALE] ?? $this->shortName; + $locales = \array_merge( + [$locale ?? $this->displayLocale], + Yasumi::getParentLocales($this->displayLocale), + [self::DEFAULT_LOCALE] + ); + + foreach ($locales as $locale) { + if (isset($this->translations[$locale])) { + return $this->translations[$locale]; + } + } + + return $this->shortName; } /** diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 782522c2a..2f87b0e78 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -71,15 +71,15 @@ public function initialize(): void private function calculateNewYearHolidays(): void { $newyearsday = new DateTime("$this->year-01-01", new DateTimeZone($this->timezone)); - $this->calculateHoliday('newYearsDay', ['en_AU' => 'New Year\'s Day'], $newyearsday, false, false); + $this->calculateHoliday('newYearsDay', [], $newyearsday, false, false); switch ($newyearsday->format('w')) { case 0: // sunday $newyearsday->add(new DateInterval('P1D')); - $this->calculateHoliday('newYearsHoliday', ['en_AU' => 'New Year\'s Holiday'], $newyearsday, false, false); + $this->calculateHoliday('newYearsHoliday', ['en' => 'New Year\'s Holiday'], $newyearsday, false, false); break; case 6: // saturday $newyearsday->add(new DateInterval('P2D')); - $this->calculateHoliday('newYearsHoliday', ['en_AU' => 'New Year\'s Holiday'], $newyearsday, false, false); + $this->calculateHoliday('newYearsHoliday', ['en' => 'New Year\'s Holiday'], $newyearsday, false, false); break; } } @@ -137,7 +137,7 @@ private function calculateAustraliaDay(): void { $date = new DateTime("$this->year-01-26", new DateTimeZone($this->timezone)); - $this->calculateHoliday('australiaDay', ['en_AU' => 'Australia Day'], $date); + $this->calculateHoliday('australiaDay', ['en' => 'Australia Day'], $date); } /** @@ -163,7 +163,7 @@ private function calculateAnzacDay(): void } $date = new DateTime("$this->year-04-25", new DateTimeZone($this->timezone)); - $this->calculateHoliday('anzacDay', ['en_AU' => 'ANZAC Day'], $date, false, false); + $this->calculateHoliday('anzacDay', [], $date, false, false); $easter = $this->calculateEaster($this->year, $this->timezone); $easterMonday = $this->calculateEaster($this->year, $this->timezone); @@ -172,7 +172,7 @@ private function calculateAnzacDay(): void $fDate = $date->format('Y-m-d'); if ($fDate === $easter->format('Y-m-d') || $fDate === $easterMonday->format('Y-m-d')) { $easterMonday->add(new DateInterval('P1D')); - $this->calculateHoliday('easterTuesday', ['en_AU' => 'Easter Tuesday'], $easterMonday, false, false); + $this->calculateHoliday('easterTuesday', ['en' => 'Easter Tuesday'], $easterMonday, false, false); } unset($fDate); } @@ -193,23 +193,23 @@ private function calculateChristmasDay(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); - $this->calculateHoliday('christmasDay', ['en_AU' => 'Christmas Day'], $christmasDay, false, false); - $this->calculateHoliday('secondChristmasDay', ['en_AU' => 'Boxing Day'], $boxingDay, false, false); + $this->calculateHoliday('christmasDay', [], $christmasDay, false, false); + $this->calculateHoliday('secondChristmasDay', [], $boxingDay, false, false); switch ($christmasDay->format('w')) { case 0: // sunday $christmasDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('christmasHoliday', ['en' => 'Christmas Holiday'], $christmasDay, false, false); break; case 5: // friday $boxingDay->add(new DateInterval('P2D')); - $this->calculateHoliday('secondChristmasHoliday', ['en_AU' => 'Boxing Day Holiday'], $boxingDay, false, false); + $this->calculateHoliday('secondChristmasHoliday', ['en' => 'Boxing Day Holiday'], $boxingDay, false, false); break; case 6: // saturday $christmasDay->add(new DateInterval('P2D')); $boxingDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); - $this->calculateHoliday('secondChristmasHoliday', ['en_AU' => 'Boxing Day Holiday'], $boxingDay, false, false); + $this->calculateHoliday('christmasHoliday', ['en' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('secondChristmasHoliday', ['en' => 'Boxing Day Holiday'], $boxingDay, false, false); break; } } diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index 32c660a45..6a51099ed 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -77,7 +77,7 @@ private function easterSunday($year, $timezone, $locale, $type = null): Holiday { return new Holiday( 'easter', - ['en_AU' => 'Easter Sunday'], + ['en' => 'Easter Sunday'], $this->calculateEaster($year, $timezone), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -109,7 +109,7 @@ private function easterSaturday($year, $timezone, $locale, $type = null): Holida { return new Holiday( 'easterSaturday', - ['en_AU' => 'Easter Saturday'], + ['en' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -135,7 +135,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -151,7 +151,7 @@ private function calculateLabourDay(): void { $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('labourDay', ['en_AU' => 'Labour Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } /** @@ -166,7 +166,7 @@ private function calculateCanberraDay(): void } else { $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); } - $this->addHoliday(new Holiday('canberraDay', ['en_AU' => 'Canberra Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('canberraDay', ['en' => 'Canberra Day'], $date, $this->locale)); } /** @@ -185,6 +185,6 @@ private function calculateReconciliationDay(): void if (1 !== $day) { $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P' . (8 - $day) . 'D')); } - $this->addHoliday(new Holiday('reconciliationDay', ['en_AU' => 'Reconciliation Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('reconciliationDay', ['en' => 'Reconciliation Day'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index f6f076493..d1adb1ecb 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -44,7 +44,7 @@ public function initialize(): void { parent::initialize(); - $this->addHoliday(new Holiday('easter', ['en_AU' => 'Easter Sunday'], $this->calculateEaster($this->year, $this->timezone), $this->locale)); + $this->addHoliday(new Holiday('easter', [], $this->calculateEaster($this->year, $this->timezone), $this->locale)); $this->addHoliday($this->easterSaturday($this->year, $this->timezone, $this->locale)); $this->calculateQueensBirthday(); $this->calculateLabourDay(); @@ -76,7 +76,7 @@ private function easterSaturday($year, $timezone, $locale, $type = null): Holida { return new Holiday( 'easterSaturday', - ['en_AU' => 'Easter Saturday'], + ['en' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -102,7 +102,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -131,7 +131,7 @@ private function calculateBankHoliday(): void { $this->calculateHoliday( 'bankHoliday', - ['en_AU' => 'Bank Holiday'], + ['en' => 'Bank Holiday'], new DateTime('first monday of august ' . $this->year, new DateTimeZone($this->timezone)), false, false, diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index 5fb505c05..c8423879b 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -75,7 +75,7 @@ private function easterSaturday($year, $timezone, $locale, $type = null): Holida { return new Holiday( 'easterSaturday', - ['en_AU' => 'Easter Saturday'], + ['en' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -101,7 +101,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -117,7 +117,7 @@ private function calculateMayDay(): void { $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('mayDay', ['en_AU' => 'May Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('mayDay', ['en' => 'May Day'], $date, $this->locale)); } /** @@ -132,7 +132,7 @@ private function calculatePicnicDay(): void { $this->calculateHoliday( 'picnicDay', - ['en_AU' => 'Picnic Day'], + ['en' => 'Picnic Day'], new DateTime('first monday of august ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index eb740ee94..0e954878b 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -67,7 +67,7 @@ private function calculateQueensBirthday(): void if ($this->year < 2012 || 2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -75,7 +75,7 @@ private function calculateQueensBirthday(): void } else { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('first monday of october ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index efdccc17a..84accf1a6 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -72,6 +72,6 @@ private function calculatePeoplesDay(): void $date = $date->add(new DateInterval('P7D')); } $date = $date->add(new DateInterval('P5D')); - $this->addHoliday(new Holiday('peoplesDay', ['en_AU' => 'Ekka People\'s Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('peoplesDay', ['en' => 'Ekka People\'s Day'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SA.php index 39d684011..d8b500413 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -83,7 +83,7 @@ private function easterSaturday($year, $timezone, $locale, $type = null): Holida { return new Holiday( 'easterSaturday', - ['en_AU' => 'Easter Saturday'], + ['en' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -109,7 +109,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -125,7 +125,7 @@ private function calculateLabourDay(): void { $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('labourDay', ['en_AU' => 'Labour Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('labourDay', ['en' => 'Labour Day'], $date, $this->locale)); } /** @@ -142,7 +142,7 @@ private function calculateAdelaideCupDay(): void if ($this->year < 2006) { $this->calculateHoliday( 'adelaideCup', - ['en_AU' => 'Adelaide Cup'], + ['en' => 'Adelaide Cup'], new DateTime('third monday of may ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -150,7 +150,7 @@ private function calculateAdelaideCupDay(): void } else { $this->calculateHoliday( 'adelaideCup', - ['en_AU' => 'Adelaide Cup'], + ['en' => 'Adelaide Cup'], new DateTime('second monday of march ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -167,27 +167,27 @@ private function calculateAdelaideCupDay(): void private function calculateProclamationDay(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); - $this->calculateHoliday('christmasDay', ['en_AU' => 'Christmas Day'], $christmasDay, false, false); + $this->calculateHoliday('christmasDay', [], $christmasDay, false, false); switch ($christmasDay->format('w')) { case 0: // sunday $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('christmasHoliday', ['en' => 'Christmas Holiday'], $christmasDay, false, false); $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); break; case 5: // friday $proclamationDay = $christmasDay->add(new DateInterval('P3D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); break; case 6: // saturday $christmasDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('christmasHoliday', ['en' => 'Christmas Holiday'], $christmasDay, false, false); $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); break; default: // monday-thursday $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); break; } } diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 850cad0e0..bf53bbe03 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -57,7 +57,7 @@ private function calculateEightHoursDay(): void { $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('eightHourDay', ['en_AU' => 'Eight Hour Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('eightHourDay', ['en' => 'Eight Hour Day'], $date, $this->locale)); } /** @@ -79,7 +79,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => 'Queen\'s Birthday'], + ['en' => 'Queen\'s Birthday'], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -98,7 +98,7 @@ private function calculateRecreationDay(): void { $this->calculateHoliday( 'recreationDay', - ['en_AU' => 'Recreation Day'], + ['en' => 'Recreation Day'], new DateTime('first monday of november ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index 164fd339e..65761d3fb 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -54,6 +54,6 @@ private function calculateDevonportShow(): void { $date = new DateTime($this->year . '-12-02', new DateTimeZone($this->timezone)); $date = $date->modify('previous friday'); - $this->addHoliday(new Holiday('devonportShow', ['en_AU' => 'Devonport Show'], $date, $this->locale)); + $this->addHoliday(new Holiday('devonportShow', ['en' => 'Devonport Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php index 0fed05175..2dedb98d8 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -55,6 +55,6 @@ private function calculateFlindersIslandShow(): void { $date = new DateTime('third saturday of october ' . $this->year, new DateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P1D')); - $this->addHoliday(new Holiday('flindersIslandShow', ['en_AU' => 'Flinders Island Show'], $date, $this->locale)); + $this->addHoliday(new Holiday('flindersIslandShow', ['en' => 'Flinders Island Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index b9187f895..f26bdd06d 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -53,7 +53,7 @@ private function calculateKingIslandShow(): void { $this->calculateHoliday( 'kingIslandShow', - ['en_AU' => 'King Island Show'], + ['en' => 'King Island Show'], new DateTime('first tuesday of march ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index 072e067a1..dcd67f1c1 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -55,6 +55,6 @@ private function calculateLauncestonShow(): void { $date = new DateTime('second saturday of october ' . $this->year, new DateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P2D')); - $this->addHoliday(new Holiday('launcestonShow', ['en_AU' => 'Royal Launceston Show'], $date, $this->locale)); + $this->addHoliday(new Holiday('launcestonShow', ['en' => 'Royal Launceston Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php index aeb23e4b2..049d56c0f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -55,6 +55,6 @@ private function calculateBurnieShow(): void { $date = new DateTime('first saturday of october ' . $this->year, new DateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P1D')); - $this->addHoliday(new Holiday('burnieShow', ['en_AU' => 'Burnie Show'], $date, $this->locale)); + $this->addHoliday(new Holiday('burnieShow', ['en' => 'Burnie Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php index 9c16c5836..4c7108281 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -55,6 +55,6 @@ private function calculateAGFEST(): void { $date = new DateTime('first thursday of may ' . $this->year, new DateTimeZone($this->timezone)); $date = $date->add(new DateInterval('P1D')); - $this->addHoliday(new Holiday('agfest', ['en_AU' => 'AGFEST'], $date, $this->locale)); + $this->addHoliday(new Holiday('agfest', ['en' => 'AGFEST'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South.php b/src/Yasumi/Provider/Australia/Tasmania/South.php index e3d920d51..562b59de0 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -55,6 +55,6 @@ private function calculateHobartShow(): void { $date = new DateTime('fourth saturday of october ' . $this->year, new DateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P2D')); - $this->addHoliday(new Holiday('hobartShow', ['en_AU' => 'Royal Hobart Show'], $date, $this->locale)); + $this->addHoliday(new Holiday('hobartShow', ['en' => 'Royal Hobart Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index b95923dff..c1ae91d3c 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -56,7 +56,7 @@ private function calculateHobartRegatta(): void { $this->calculateHoliday( 'hobartRegatta', - ['en_AU' => 'Royal Hobart Regatta'], + ['en' => 'Royal Hobart Regatta'], new DateTime('second monday of february ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 05f6120ab..9deb59faf 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -77,7 +77,7 @@ private function easterSunday($year, $timezone, $locale, $type = null): Holiday { return new Holiday( 'easter', - ['en_AU' => 'Easter Sunday'], + ['en' => 'Easter Sunday'], $this->calculateEaster($year, $timezone), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -109,7 +109,7 @@ private function easterSaturday($year, $timezone, $locale, $type = null): Holida { return new Holiday( 'easterSaturday', - ['en_AU' => 'Easter Saturday'], + ['en' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -125,7 +125,7 @@ private function calculateLabourDay(): void { $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('labourDay', ['en_AU' => 'Labour Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } /** @@ -147,7 +147,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => 'Queen\'s Birthday'], + ['en' => 'Queen\'s Birthday'], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -163,7 +163,7 @@ private function calculateMelbourneCupDay(): void { $date = new DateTime('first Tuesday of November' . " $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('melbourneCup', ['en_AU' => 'Melbourne Cup'], $date, $this->locale)); + $this->addHoliday(new Holiday('melbourneCup', ['en' => 'Melbourne Cup'], $date, $this->locale)); } /** @@ -194,7 +194,7 @@ private function calculateAFLGrandFinalDay(): void $this->addHoliday(new Holiday( 'aflGrandFinalFriday', - ['en_AU' => 'AFL Grand Final Friday'], + ['en' => 'AFL Grand Final Friday'], $date, $this->locale )); diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index 15191f29a..74649e098 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -68,7 +68,7 @@ private function calculateQueensBirthday(): void if (2011 === $this->year) { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('2011-10-28', new DateTimeZone($this->timezone)), false, false @@ -76,7 +76,7 @@ private function calculateQueensBirthday(): void } elseif (2012 === $this->year) { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('2012-10-01', new DateTimeZone($this->timezone)), false, false @@ -84,7 +84,7 @@ private function calculateQueensBirthday(): void } else { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('last monday of september ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -116,7 +116,7 @@ private function calculateWesternAustraliaDay(): void { $this->calculateHoliday( 'westernAustraliaDay', - ['en_AU' => 'Western Australia Day'], + ['en' => 'Western Australia Day'], new DateTime('first monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index 57df71a06..0d31900db 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -88,7 +88,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', - ['de_AT' => 'Nationalfeiertag'], + ['de' => 'Nationalfeiertag'], new DateTime($this->year . '-10-26', new \DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index 86b6b244b..b1059dcc8 100755 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -64,11 +64,9 @@ public function initialize(): void * Belgian National Day is the National Day of Belgium celebrated on 21 July each year. */ $this->addHoliday(new Holiday('nationalDay', [ - 'fr_FR' => 'Fête nationale', - 'fr_BE' => 'Fête nationale', - 'en_US' => 'Belgian National Day', - 'nl_NL' => 'Nationale feestdag', - 'nl_BE' => 'Nationale feestdag' + 'fr' => 'Fête nationale', + 'en' => 'Belgian National Day', + 'nl' => 'Nationale feestdag' ], new DateTime("$this->year-7-21", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index dabc956b4..c2b1524a6 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -57,8 +57,8 @@ public function initialize(): void // Add Orthodox holidays $this->addHoliday(new Holiday('orthodoxChristmasDay', [ - 'en_US' => 'Orthodox Christmas Day', - 'bs_Latn_BA' => 'Pravoslavni Božić' + 'en' => 'Orthodox Christmas Day', + 'bs_Latn' => 'Pravoslavni Božić' ], new DateTime("{$this->year}-01-07", new DateTimeZone($this->timezone)))); /** @@ -66,8 +66,8 @@ public function initialize(): void */ if ($this->year >= 1992) { $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day', - 'bs_Latn_BA' => 'Dan Nezavisnosti' + 'en' => 'Independence Day', + 'bs_Latn' => 'Dan Nezavisnosti' ], new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), $this->locale)); } @@ -76,8 +76,8 @@ public function initialize(): void */ if ($this->year >= 1943) { $this->addHoliday(new Holiday('statehoodDay', [ - 'en_US' => 'Statehood Day', - 'bs_Latn_BA' => 'Dan državnosti' + 'en' => 'Statehood Day', + 'bs_Latn' => 'Dan državnosti' ], new DateTime("$this->year-11-25", new DateTimeZone($this->timezone)), $this->locale)); } @@ -85,16 +85,16 @@ public function initialize(): void * Day after New Years Day */ $this->addHoliday(new Holiday('dayAfterNewYearsDay', [ - 'en_US' => 'Day after New Year\'s Day', - 'ro_RO' => 'Nova godina - drugi dan' + 'en' => 'Day after New Year\'s Day', + 'bs_Latn' => 'Nova godina - drugi dan' ], new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)), $this->locale)); /** * Second Labour day */ $this->addHoliday(new Holiday('secondLabourDay', [ - 'en_US' => 'Second Labour Day', - 'ro_RO' => 'Praznik rada - drugi dan' + 'en' => 'Second Labour Day', + 'bs_Latn' => 'Praznik rada - drugi dan' ], new DateTime("$this->year-05-02", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index b769484eb..fa27e96a8 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -69,7 +69,7 @@ public function initialize(): void $carnavalMonday = clone $easter; $this->addHoliday(new Holiday( 'carnavalMonday', - ['pt_BR' => 'Segunda-feira de Carnaval'], + ['pt' => 'Segunda-feira de Carnaval'], $carnavalMonday->sub(new DateInterval('P48D')), $this->locale, Holiday::TYPE_OBSERVANCE @@ -78,7 +78,7 @@ public function initialize(): void $carnavalTuesday = clone $easter; $this->addHoliday(new Holiday( 'carnavalTuesday', - ['pt_BR' => 'Terça-feira de Carnaval'], + ['pt' => 'Terça-feira de Carnaval'], $carnavalTuesday->sub(new DateInterval('P47D')), $this->locale, Holiday::TYPE_OBSERVANCE @@ -97,7 +97,7 @@ public function initialize(): void if ($this->year >= 1792) { $this->addHoliday(new Holiday( 'tiradentesDay', - ['pt_BR' => 'Dia de Tiradentes'], + ['pt' => 'Dia de Tiradentes'], new DateTime("$this->year-04-21", new DateTimeZone($this->timezone)), $this->locale )); @@ -114,7 +114,7 @@ public function initialize(): void if ($this->year >= 1822) { $this->addHoliday(new Holiday( 'independenceDay', - ['pt_BR' => 'Dia da Independência do Brasil'], + ['pt' => 'Dia da Independência do Brasil'], new DateTime("$this->year-09-07", new DateTimeZone($this->timezone)), $this->locale )); @@ -134,7 +134,7 @@ public function initialize(): void if ($this->year >= 1980) { $this->addHoliday(new Holiday( 'ourLadyOfAparecidaDay', - ['pt_BR' => 'Dia de Nossa Senhora Aparecida'], + ['pt' => 'Dia de Nossa Senhora Aparecida'], new DateTime("$this->year-10-12", new DateTimeZone($this->timezone)), $this->locale )); @@ -150,7 +150,7 @@ public function initialize(): void if ($this->year >= 1300) { $this->addHoliday(new Holiday( 'allSoulsDay', - ['pt_BR' => 'Dia de Finados'], + ['pt' => 'Dia de Finados'], new DateTime("$this->year-11-02", new DateTimeZone($this->timezone)), $this->locale )); @@ -168,7 +168,7 @@ public function initialize(): void if ($this->year >= 1889) { $this->addHoliday(new Holiday( 'proclamationOfRepublicDay', - ['pt_BR' => 'Dia da Proclamação da República'], + ['pt' => 'Dia da Proclamação da República'], new DateTime("$this->year-11-15", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 067fde886..87e219c03 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -64,8 +64,8 @@ public function initialize(): void */ if ($this->year >= 1941) { $this->addHoliday(new Holiday('antifascistStruggleDay', [ - 'en_US' => 'Day of Antifascist Struggle', - 'hr_HR' => 'Dan antifašističke borbe' + 'en' => 'Day of Antifascist Struggle', + 'hr' => 'Dan antifašističke borbe' ], new DateTime("$this->year-6-22", new DateTimeZone($this->timezone)), $this->locale)); } @@ -74,8 +74,8 @@ public function initialize(): void */ if ($this->year >= 1991) { $this->addHoliday(new Holiday('statehoodDay', [ - 'en_US' => 'Statehood Day', - 'hr_HR' => 'Dan državnosti' + 'en' => 'Statehood Day', + 'hr' => 'Dan državnosti' ], new DateTime("$this->year-6-25", new DateTimeZone($this->timezone)), $this->locale)); } @@ -84,8 +84,8 @@ public function initialize(): void */ if ($this->year >= 1995) { $this->addHoliday(new Holiday('homelandThanksgiving', [ - 'en_US' => 'Homeland Thanksgiving Day', - 'hr_HR' => 'Dan domovinske zahvalnosti' + 'en' => 'Homeland Thanksgiving Day', + 'hr' => 'Dan domovinske zahvalnosti' ], new DateTime("$this->year-8-5", new DateTimeZone($this->timezone)), $this->locale)); } @@ -94,8 +94,8 @@ public function initialize(): void */ if ($this->year >= 1991) { $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day', - 'hr_HR' => 'Dan neovisnosti' + 'en' => 'Independence Day', + 'hr' => 'Dan neovisnosti' ], new DateTime("$this->year-10-8", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index 5b24116fb..74a652888 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -77,8 +77,8 @@ private function calculateRenewalOfCzechIndependenceDay(): void $this->addHoliday(new Holiday( 'czechRenewalOfIndependentStateDay', [ - 'cs_CZ' => 'Den obnovy samostatného českého státu', - 'en_US' => 'Day of renewal of the independent Czech state' + 'cs' => 'Den obnovy samostatného českého státu', + 'en' => 'Day of renewal of the independent Czech state' ], new DateTime($this->year . '-01-01', new \DateTimeZone($this->timezone)), $this->locale @@ -110,7 +110,10 @@ private function calculateSaintsCyrilAndMethodiusDay(): void { $this->addHoliday(new Holiday( 'saintsCyrilAndMethodiusDay', - ['cs_CZ' => 'Den slovanských věrozvěstů Cyrila a Metoděje', 'en_US' => 'Saints Cyril and Methodius Day'], + [ + 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', + 'en' => 'Saints Cyril and Methodius Day' + ], new DateTime($this->year . '-07-5', new \DateTimeZone($this->timezone)), $this->locale )); @@ -135,7 +138,7 @@ private function calculateJanHusDay(): void { $this->addHoliday(new Holiday( 'janHusDay', - ['cs_CZ' => 'Den upálení mistra Jana Husa', 'en_US' => 'Jan Hus Day'], + ['cs' => 'Den upálení mistra Jana Husa', 'en' => 'Jan Hus Day'], new DateTime($this->year . '-07-6', new \DateTimeZone($this->timezone)), $this->locale )); @@ -163,7 +166,10 @@ private function calculateCzechStatehoodDay(): void { $this->addHoliday(new Holiday( 'czechStateHoodDay', - ['cs_CZ' => 'Den české státnosti', 'en_US' => 'St. Wenceslas Day (Czech Statehood Day)'], + [ + 'cs' => 'Den české státnosti', + 'en' => 'St. Wenceslas Day (Czech Statehood Day)' + ], new DateTime($this->year . '-09-28', new \DateTimeZone($this->timezone)), $this->locale )); @@ -182,8 +188,8 @@ private function calculateCzechStatehoodDay(): void private function calculateIndependentCzechoslovakStateDay(): void { $this->addHoliday(new Holiday('independentCzechoslovakStateDay', [ - 'cs_CZ' => 'Den vzniku samostatného československého státu', - 'en_US' => 'Independent Czechoslovak State Day' + 'cs' => 'Den vzniku samostatného československého státu', + 'en' => 'Independent Czechoslovak State Day' ], new DateTime($this->year . '-10-28', new \DateTimeZone($this->timezone)), $this->locale)); } @@ -201,7 +207,10 @@ private function calculateStruggleForFreedomAndDemocracyDay(): void { $this->addHoliday(new Holiday( 'struggleForFreedomAndDemocracyDay', - ['cs_CZ' => 'Den boje za svobodu a demokracii', 'en_US' => 'Struggle for Freedom and Democracy Day'], + [ + 'cs' => 'Den boje za svobodu a demokracii', + 'en' => 'Struggle for Freedom and Democracy Day' + ], new DateTime($this->year . '-11-17', new \DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index e17da2d63..689b21deb 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -97,7 +97,7 @@ private function calculateGreatPrayerDay(): void if ($this->year >= 1686) { $this->addHoliday(new Holiday( 'greatPrayerDay', - ['da_DK' => 'Store bededag'], + ['da' => 'Store bededag'], new DateTime("fourth friday $easter", new DateTimeZone($this->timezone)), $this->locale )); @@ -125,7 +125,7 @@ private function calculateConstitutionDay(): void if ($this->year >= 1849) { $this->addHoliday(new Holiday( 'constitutionDay', - ['da_DK' => 'Grundlovsdag'], + ['da' => 'Grundlovsdag'], new DateTime("$this->year-6-5", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index 34014ebd1..d863ecf5c 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -69,8 +69,8 @@ private function addIndependenceDay(): void { if ($this->year >= self::DECLARATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day', - 'et_EE' => 'Iseseisvuspäev' + 'en' => 'Independence Day', + 'et' => 'Iseseisvuspäev' ], new \DateTime("{$this->year}-02-24", new \DateTimeZone($this->timezone)))); } } @@ -83,8 +83,8 @@ private function addVictoryDay(): void { if ($this->year >= self::VICTORY_DAY_START_YEAR) { $this->addHoliday(new Holiday('victoryDay', [ - 'en_US' => 'Victory Day', - 'et_EE' => 'Võidupüha' + 'en' => 'Victory Day', + 'et' => 'Võidupüha' ], new \DateTime("{$this->year}-06-23", new \DateTimeZone($this->timezone)))); } } @@ -97,8 +97,8 @@ private function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('restorationOfIndependenceDay', [ - 'en_US' => 'Day of Restoration of Independence', - 'et_EE' => 'Tasiseseisvumispäev' + 'en' => 'Day of Restoration of Independence', + 'et' => 'Tasiseseisvumispäev' ], new \DateTime("{$this->year}-08-20", new \DateTimeZone($this->timezone)))); } } diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index dfb69f00e..00f861a9c 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -150,7 +150,7 @@ private function calculateIndependenceDay(): void if ($this->year >= 1917) { $this->addHoliday(new Holiday( 'independenceDay', - ['fi_FI' => 'Itsenäisyyspäivä'], + ['fi' => 'Itsenäisyyspäivä'], new DateTime("$this->year-12-6", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 4935c9390..8fa0c789e 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -88,8 +88,8 @@ private function calculateBastilleDay(): void { if ($this->year >= 1790) { $this->addHoliday(new Holiday('bastilleDay', [ - 'en_US' => 'Bastille Day', - 'fr_FR' => 'La Fête nationale' + 'en' => 'Bastille Day', + 'fr' => 'La Fête nationale' ], new DateTime("$this->year-7-14", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index 6933a7f26..a1f68d2a8 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -86,7 +86,7 @@ private function calculateGermanUnityDay(): void if ($this->year >= 1990) { $this->addHoliday(new Holiday( 'germanUnityDay', - ['de_DE' => 'Tag der Deutschen Einheit'], + ['de' => 'Tag der Deutschen Einheit'], new DateTime($this->year . '-10-3', new \DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index c4b0fae5f..1e7c1665b 100755 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -92,7 +92,7 @@ private function calculateRepentanceAndPrayerDay(): void if ($this->year >= 1995) { $this->addHoliday(new Holiday( 'repentanceAndPrayerDay', - ['de_DE' => 'Buß- und Bettag'], + ['de' => 'Buß- und Bettag'], new DateTime("next wednesday $this->year-11-15", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index b1f815924..c29132560 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -85,7 +85,7 @@ private function calculateThreeHolyHierarchs(): void { $this->addHoliday(new Holiday( 'threeHolyHierarchs', - ['el_GR' => 'Τριών Ιεραρχών'], + ['el' => 'Τριών Ιεραρχών'], new DateTime("$this->year-1-30", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER @@ -110,7 +110,7 @@ private function calculateCleanMonday(): void { $this->addHoliday(new Holiday( 'cleanMonday', - ['el_GR' => 'Καθαρά Δευτέρα'], + ['el' => 'Καθαρά Δευτέρα'], $this->calculateEaster($this->year, $this->timezone)->sub(new DateInterval('P48D')), $this->locale )); @@ -149,7 +149,7 @@ private function calculateIndependenceDay(): void if ($this->year >= 1821) { $this->addHoliday(new Holiday( 'independenceDay', - ['el_GR' => 'Εικοστή Πέμπτη Μαρτίου'], + ['el' => 'Εικοστή Πέμπτη Μαρτίου'], new DateTime("$this->year-3-25", new DateTimeZone($this->timezone)), $this->locale )); @@ -173,7 +173,7 @@ private function calculateOhiDay(): void if ($this->year >= 1940) { $this->addHoliday(new Holiday( 'ohiDay', - ['el_GR' => 'Επέτειος του Όχι'], + ['el' => 'Επέτειος του Όχι'], new DateTime("$this->year-10-28", new DateTimeZone($this->timezone)), $this->locale )); @@ -197,7 +197,7 @@ private function calculatePolytechnio(): void if ($this->year >= 1973) { $this->addHoliday(new Holiday( 'polytechnio', - ['el_GR' => 'Πολυτεχνείο'], + ['el' => 'Πολυτεχνείο'], new DateTime("$this->year-11-17", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index bf1c73061..11e8715ac 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -66,8 +66,8 @@ public function initialize(): void */ if ($this->year >= 1927) { $this->addHoliday(new Holiday('memorialDay1848', [ - 'en_US' => 'Memorial day of the 1848 Revolution', - 'hu_HU' => 'Az 1848-as forradalom ünnepe' + 'en' => 'Memorial day of the 1848 Revolution', + 'hu' => 'Az 1848-as forradalom ünnepe' ], new DateTime("$this->year-3-15", new DateTimeZone($this->timezone)), $this->locale)); } @@ -76,8 +76,8 @@ public function initialize(): void */ if ($this->year >= 1891) { $this->addHoliday(new Holiday('stateFoundation', [ - 'en_US' => 'State Foundation Day', - 'hu_HU' => 'Az államalapítás ünnepe' + 'en' => 'State Foundation Day', + 'hu' => 'Az államalapítás ünnepe' ], new DateTime("$this->year-8-20", new DateTimeZone($this->timezone)), $this->locale)); } @@ -86,8 +86,8 @@ public function initialize(): void */ if ($this->year >= 1991) { $this->addHoliday(new Holiday('memorialDay1956', [ - 'en_US' => 'Memorial day of the 1956 Revolution', - 'hu_HU' => 'Az 1956-os forradalom ünnepe' + 'en' => 'Memorial day of the 1956 Revolution', + 'hu' => 'Az 1956-os forradalom ünnepe' ], new DateTime("$this->year-10-23", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 1e4aa8ef6..4bf000ba4 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -68,7 +68,7 @@ public function initialize(): void $this->calculateJuneHoliday(); $this->addHoliday(new Holiday( 'augustHoliday', - ['en_IE' => 'August Holiday', 'ga_IE' => 'Lá Saoire i mí Lúnasa'], + ['en' => 'August Holiday', 'ga' => 'Lá Saoire i mí Lúnasa'], new DateTime("next monday $this->year-7-31", new DateTimeZone($this->timezone)), $this->locale )); @@ -157,7 +157,7 @@ private function calculateChristmasDay(): void { $holiday = new Holiday( 'christmasDay', - ['en_IE' => 'Christmas Day', 'ga_IE' => 'Lá Nollag'], + ['en' => 'Christmas Day', 'ga' => 'Lá Nollag'], new DateTime($this->year . '-12-25', new DateTimeZone($this->timezone)), $this->locale ); @@ -242,7 +242,7 @@ private function calculateStPatricksDay(): void } $holiday = new Holiday( 'stPatricksDay', - ['en_IE' => 'St. Patrick\'s Day', 'ga_IE' => 'Lá Fhéile Pádraig'], + ['en' => 'St. Patrick\'s Day', 'ga' => 'Lá Fhéile Pádraig'], new DateTime($this->year . '-3-17', new DateTimeZone($this->timezone)), $this->locale ); @@ -288,7 +288,7 @@ private function calculateMayDay(): void $this->addHoliday(new Holiday( 'mayDay', - ['en_IE' => 'May Day', 'ga_IE' => 'Lá Bealtaine'], + ['en' => 'May Day', 'ga' => 'Lá Bealtaine'], new DateTime("next monday $this->year-4-30", new DateTimeZone($this->timezone)), $this->locale )); @@ -316,7 +316,7 @@ private function calculateJuneHoliday(): void $this->addHoliday(new Holiday( 'juneHoliday', - ['en_IE' => 'June Holiday', 'ga_IE' => 'Lá Saoire i mí an Mheithimh'], + ['en' => 'June Holiday', 'ga' => 'Lá Saoire i mí an Mheithimh'], new DateTime("next monday $this->year-5-31", new DateTimeZone($this->timezone)), $this->locale )); @@ -343,7 +343,7 @@ private function calculateOctoberHoliday(): void $this->addHoliday(new Holiday( 'octoberHoliday', - ['en_IE' => 'October Holiday', 'ga_IE' => 'Lá Saoire i mí Dheireadh Fómhair'], + ['en' => 'October Holiday', 'ga' => 'Lá Saoire i mí Dheireadh Fómhair'], new DateTime("previous monday $this->year-11-01", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index b6f90932a..6f98cfd18 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -84,7 +84,7 @@ private function calculateLiberationDay(): void if ($this->year >= 1949) { $this->addHoliday(new Holiday( 'liberationDay', - ['it_IT' => 'Festa della Liberazione'], + ['it' => 'Festa della Liberazione'], new DateTime("$this->year-4-25", new DateTimeZone($this->timezone)), $this->locale )); @@ -112,7 +112,7 @@ private function calculateRepublicDay(): void if ($this->year >= 1946) { $this->addHoliday(new Holiday( 'republicDay', - ['it_IT' => 'Festa della Repubblica'], + ['it' => 'Festa della Repubblica'], new DateTime("$this->year-6-2", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 99eb596a0..0a7ce2bcc 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -119,7 +119,10 @@ private function calculateNationalFoundationDay(): void if ($this->year >= 1966) { $this->addHoliday(new Holiday( 'nationalFoundationDay', - ['en_US' => 'National Foundation Day', 'ja_JP' => '建国記念の日'], + [ + 'en' => 'National Foundation Day', + 'ja' => '建国記念の日' + ], new DateTime("$this->year-2-11", new DateTimeZone($this->timezone)), $this->locale )); @@ -136,7 +139,10 @@ private function calculateShowaDay(): void if ($this->year >= 2007) { $this->addHoliday(new Holiday( 'showaDay', - ['en_US' => 'Showa Day', 'ja_JP' => '昭和の日'], + [ + 'en' => 'Showa Day', + 'ja' => '昭和の日' + ], new DateTime("$this->year-4-29", new DateTimeZone($this->timezone)), $this->locale )); @@ -153,7 +159,10 @@ private function calculateConstitutionMemorialDay(): void if ($this->year >= 1948) { $this->addHoliday(new Holiday( 'constitutionMemorialDay', - ['en_US' => 'Constitution Memorial Day', 'ja_JP' => '憲法記念日'], + [ + 'en' => 'Constitution Memorial Day', + 'ja' => '憲法記念日' + ], new DateTime("$this->year-5-3", new DateTimeZone($this->timezone)), $this->locale )); @@ -170,7 +179,10 @@ private function calculateChildrensDay(): void if ($this->year >= 1948) { $this->addHoliday(new Holiday( 'childrensDay', - ['en_US' => 'Children\'s Day', 'ja_JP' => 'こどもの日'], + [ + 'en' => 'Children\'s Day', + 'ja' => 'こどもの日' + ], new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), $this->locale )); @@ -187,7 +199,7 @@ private function calculateCultureDay(): void if ($this->year >= 1948) { $this->addHoliday(new Holiday( 'cultureDay', - ['en_US' => 'Culture Day', 'ja_JP' => '文化の日'], + ['en' => 'Culture Day', 'ja' => '文化の日'], new DateTime("$this->year-11-3", new DateTimeZone($this->timezone)), $this->locale )); @@ -204,7 +216,7 @@ private function calculateLaborThanksgivingDay(): void if ($this->year >= 1948) { $this->addHoliday(new Holiday( 'laborThanksgivingDay', - ['en_US' => 'Labor Thanksgiving Day', 'ja_JP' => '勤労感謝の日'], + ['en' => 'Labor Thanksgiving Day', 'ja' => '勤労感謝の日'], new DateTime("$this->year-11-23", new DateTimeZone($this->timezone)), $this->locale )); @@ -233,7 +245,7 @@ private function calculateEmperorsBirthday(): void if (\is_string($emperorsBirthday)) { $this->addHoliday(new Holiday( 'emperorsBirthday', - ['en_US' => 'Emperors Birthday', 'ja_JP' => '天皇誕生日'], + ['en' => 'Emperors Birthday', 'ja' => '天皇誕生日'], new DateTime($emperorsBirthday, new DateTimeZone($this->timezone)), $this->locale )); @@ -270,7 +282,7 @@ private function calculateVernalEquinoxDay(): void if (\is_numeric($day)) { $this->addHoliday(new Holiday( 'vernalEquinoxDay', - ['en_US' => 'Vernal Equinox Day', 'ja_JP' => '春分の日'], + ['en' => 'Vernal Equinox Day', 'ja' => '春分の日'], new DateTime("$this->year-3-$day", new DateTimeZone($this->timezone)), $this->locale )); @@ -301,7 +313,7 @@ private function calculateComingOfAgeDay(): void if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'comingOfAgeDay', - ['en_US' => 'Coming of Age Day', 'ja_JP' => '成人の日'], + ['en' => 'Coming of Age Day', 'ja' => '成人の日'], $date, $this->locale )); @@ -331,7 +343,7 @@ private function calculateGreeneryDay(): void if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'greeneryDay', - ['en_US' => 'Greenery Day', 'ja_JP' => 'みどりの日'], + ['en' => 'Greenery Day', 'ja' => 'みどりの日'], $date, $this->locale )); @@ -365,7 +377,7 @@ private function calculateMarineDay(): void if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'marineDay', - ['en_US' => 'Marine Day', 'ja_JP' => '海の日'], + ['en' => 'Marine Day', 'ja' => '海の日'], $date, $this->locale )); @@ -394,7 +406,7 @@ private function calculateMountainDay(): void if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'mountainDay', - ['en_US' => 'Mountain Day', 'ja_JP' => '山の日'], + ['en' => 'Mountain Day', 'ja' => '山の日'], $date, $this->locale )); @@ -425,7 +437,7 @@ private function calculateRespectForTheAgeDay(): void if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'respectfortheAgedDay', - ['en_US' => 'Respect for the Aged Day', 'ja_JP' => '敬老の日'], + ['en' => 'Respect for the Aged Day', 'ja' => '敬老の日'], $date, $this->locale )); @@ -456,9 +468,9 @@ private function calculateSportsDay(): void $date = new DateTime("$this->year-10-10", new DateTimeZone($this->timezone)); } - $holiday_name = ['en_US' => 'Health And Sports Day', 'ja_JP' => '体育の日']; + $holiday_name = ['en' => 'Health And Sports Day', 'ja' => '体育の日']; if ($this->year >= 2020) { - $holiday_name = ['en_US' => 'Sports Day', 'ja_JP' => 'スポーツの日']; + $holiday_name = ['en' => 'Sports Day', 'ja' => 'スポーツの日']; } if ($date instanceof DateTimeInterface) { @@ -501,7 +513,7 @@ private function calculateAutumnalEquinoxDay(): void if (\is_numeric($day)) { $this->addHoliday(new Holiday( 'autumnalEquinoxDay', - ['en_US' => 'Autumnal Equinox Day', 'ja_JP' => '秋分の日'], + ['en' => 'Autumnal Equinox Day', 'ja' => '秋分の日'], new DateTime("$this->year-9-$day", new DateTimeZone($this->timezone)), $this->locale )); @@ -569,7 +581,7 @@ private function calculateCoronationDay(): void if (2019 === $this->year) { $this->addHoliday(new Holiday( 'coronationDay', - ['en_US' => 'Coronation Day', 'ja_JP' => '即位の日'], + ['en' => 'Coronation Day', 'ja' => '即位の日'], new DateTime("$this->year-5-1", new DateTimeZone($this->timezone)), $this->locale )); @@ -587,7 +599,7 @@ private function calculateEnthronementProclamationCeremony(): void if (2019 === $this->year) { $this->addHoliday(new Holiday( 'enthronementProclamationCeremony', - ['en_US' => 'Enthronement Proclamation Ceremony', 'ja_JP' => '即位礼正殿の儀'], + ['en' => 'Enthronement Proclamation Ceremony', 'ja' => '即位礼正殿の儀'], new DateTime("$this->year-10-22", new DateTimeZone($this->timezone)), $this->locale )); @@ -626,8 +638,8 @@ private function calculateBridgeHolidays(): void $bridgeDate->add(new DateInterval('P1D')); $this->addHoliday(new Holiday('bridgeDay' . $counter, [ - 'en_US' => 'Bridge Public holiday', - 'ja_JP' => '国民の休日' + 'en' => 'Bridge Public holiday', + 'ja' => '国民の休日' ], $bridgeDate, $this->locale)); $counter++; } diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index b722f04a1..08a6fd059 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -77,8 +77,8 @@ private function addRestorationOfIndependenceDay(): void } $this->addHoliday(new Holiday('restorationOfIndependenceOfLatviaDay', [ - 'en_US' => 'Restoration of Independence day', - 'lv_LV' => 'Latvijas Republikas Neatkarības atjaunošanas diena' + 'en' => 'Restoration of Independence day', + 'lv' => 'Latvijas Republikas Neatkarības atjaunošanas diena' ], $date)); } } @@ -90,8 +90,8 @@ private function addRestorationOfIndependenceDay(): void private function addMidsummerEveDay(): void { $this->addHoliday(new Holiday('midsummerEveDay', [ - 'en_US' => 'Midsummer Eve', - 'lv_LV' => 'Līgo Diena' + 'en' => 'Midsummer Eve', + 'lv' => 'Līgo Diena' ], new \DateTime("{$this->year}-06-23", new \DateTimeZone($this->timezone)))); } @@ -112,8 +112,8 @@ private function addProclamationDay(): void } $this->addHoliday(new Holiday('proclamationOfTheRepublicOfLatviaDay', [ - 'en_US' => 'Proclamation Day of the Republic of Latvia', - 'lv_LV' => 'Latvijas Republikas proklamēšanas diena' + 'en' => 'Proclamation Day of the Republic of Latvia', + 'lv' => 'Latvijas Republikas proklamēšanas diena' ], $date)); } } diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index 17169402b..79a4b10ff 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -81,8 +81,8 @@ private function addRestorationOfTheStateDay(): void { if ($this->year >= self::RESTORATION_OF_THE_STATE_YEAR) { $this->addHoliday(new Holiday('restorationOfTheStateOfLithuaniaDay', [ - 'en_US' => 'Day of Restoration of the State of Lithuania', - 'lt_LT' => 'Lietuvos valstybės atkūrimo diena' + 'en' => 'Day of Restoration of the State of Lithuania', + 'lt' => 'Lietuvos valstybės atkūrimo diena' ], new \DateTime("{$this->year}-02-16", new \DateTimeZone($this->timezone)))); } } @@ -97,8 +97,8 @@ private function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('restorationOfIndependenceOfLithuaniaDay', [ - 'en_US' => 'Day of Restoration of Independence of Lithuania', - 'lt_LT' => 'Lietuvos nepriklausomybės atkūrimo diena' + 'en' => 'Day of Restoration of Independence of Lithuania', + 'lt' => 'Lietuvos nepriklausomybės atkūrimo diena' ], new \DateTime("{$this->year}-03-11", new \DateTimeZone($this->timezone)))); } } @@ -114,8 +114,8 @@ private function addStatehoodDay(): void { if ($this->year >= self::STATEHOOD_YEAR) { $this->addHoliday(new Holiday('statehoodDay', [ - 'en_US' => 'Statehood Day (Lithuania)', - 'lt_LT' => 'Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena' + 'en' => 'Statehood Day (Lithuania)', + 'lt' => 'Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena' ], new \DateTime("{$this->year}-07-06", new \DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index bc244a67d..e589e62d3 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -102,7 +102,7 @@ private function calculateCarnival(): void $carnivalDay1 = clone $easter; $this->addHoliday(new Holiday( 'carnivalDay', - ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], + ['en' => 'Carnival', 'nl' => 'Carnaval'], $carnivalDay1->sub(new DateInterval('P49D')), $this->locale, Holiday::TYPE_OBSERVANCE @@ -114,7 +114,7 @@ private function calculateCarnival(): void $carnivalDay2 = clone $easter; $this->addHoliday(new Holiday( 'secondCarnivalDay', - ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], + ['en' => 'Carnival', 'nl' => 'Carnaval'], $carnivalDay2->sub(new DateInterval('P48D')), $this->locale, Holiday::TYPE_OBSERVANCE @@ -126,7 +126,7 @@ private function calculateCarnival(): void $carnivalDay3 = clone $easter; $this->addHoliday(new Holiday( 'thirdCarnivalDay', - ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], + ['en' => 'Carnival', 'nl' => 'Carnaval'], $carnivalDay3->sub(new DateInterval('P47D')), $this->locale, Holiday::TYPE_OBSERVANCE @@ -186,7 +186,7 @@ private function calculateStNicholasDay(): void */ $this->addHoliday(new Holiday( 'stNicholasDay', - ['en_US' => 'St. Nicholas\' Day', 'nl_NL' => 'Sinterklaas'], + ['en' => 'St. Nicholas\' Day', 'nl' => 'Sinterklaas'], new DateTime("$this->year-12-5", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE @@ -209,7 +209,7 @@ private function calculateHalloween(): void { $this->addHoliday(new Holiday( 'halloween', - ['en_US' => 'Halloween', 'nl_NL' => 'Halloween'], + ['en' => 'Halloween', 'nl' => 'Halloween'], new DateTime("$this->year-10-31", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE @@ -228,7 +228,7 @@ private function calculatePrincesDay(): void { $this->addHoliday(new Holiday( 'princesDay', - ['en_US' => 'Prince\'s Day', 'nl_NL' => 'Prinsjesdag'], + ['en' => 'Prince\'s Day', 'nl' => 'Prinsjesdag'], new DateTime("third tuesday of september $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER @@ -259,7 +259,7 @@ private function calculateQueensday(): void $this->addHoliday(new Holiday( 'queensDay', - ['en_US' => 'Queen\'s Day', 'nl_NL' => 'Koninginnedag'], + ['en' => 'Queen\'s Day', 'nl' => 'Koninginnedag'], $date, $this->locale )); @@ -285,7 +285,7 @@ private function calculateKingsday(): void $this->addHoliday(new Holiday( 'kingsDay', - ['en_US' => 'Kings Day', 'nl_NL' => 'Koningsdag'], + ['en' => 'Kings Day', 'nl' => 'Koningsdag'], $date, $this->locale )); @@ -304,14 +304,14 @@ private function calculateCommemorationLiberationDay(): void if ($this->year >= 1947) { $this->addHoliday(new Holiday( 'commemorationDay', - ['en_US' => 'Commemoration Day', 'nl_NL' => 'Dodenherdenking'], + ['en' => 'Commemoration Day', 'nl' => 'Dodenherdenking'], new DateTime("$this->year-5-4", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); $this->addHoliday(new Holiday( 'liberationDay', - ['en_US' => 'Liberation Day', 'nl_NL' => 'Bevrijdingsdag'], + ['en' => 'Liberation Day', 'nl' => 'Bevrijdingsdag'], new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 5f409a011..3c3e7b7df 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -184,7 +184,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', - ['en_NZ' => 'Queens Birthday'], + ['en' => 'Queens Birthday'], new DateTime("first monday of june $this->year", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index e4e39b290..39e02ba38 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -85,7 +85,7 @@ private function calculateConstitutionDay(): void if ($this->year >= 1836) { $this->addHoliday(new Holiday( 'constitutionDay', - ['nb_NO' => 'Grunnlovsdagen'], + ['nb' => 'Grunnlovsdagen'], new DateTime("$this->year-5-17", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index 3a67c9b83..4f9223877 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -86,8 +86,8 @@ private function calculateIndependenceDay(): void } $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day', - 'pl_PL' => 'Narodowe Święto Niepodległości' + 'en' => 'Independence Day', + 'pl' => 'Narodowe Święto Niepodległości' ], new DateTime("$this->year-11-11", new DateTimeZone($this->timezone)), $this->locale)); } @@ -114,8 +114,8 @@ private function calculateConstitutionDay(): void } $this->addHoliday(new Holiday('constitutionDay', [ - 'en_US' => 'Constitution Day', - 'pl_PL' => 'Święto Narodowe Trzeciego Maja' + 'en' => 'Constitution Day', + 'pl' => 'Święto Narodowe Trzeciego Maja' ], new DateTime("$this->year-5-3", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 2d8fb1232..f0dc6873b 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -88,7 +88,7 @@ private function calculateCarnationRevolutionDay(): void if ($this->year >= 1974) { $this->addHoliday(new Holiday( '25thApril', - ['pt_PT' => 'Dia da Liberdade'], + ['pt' => 'Dia da Liberdade'], new DateTime("$this->year-04-25", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL @@ -135,7 +135,7 @@ private function calculatePortugalDay(): void if ($this->year <= 1932 || $this->year >= 1974) { $this->addHoliday(new Holiday( 'portugalDay', - ['pt_PT' => 'Dia de Portugal'], + ['pt' => 'Dia de Portugal'], new DateTime("$this->year-06-10", new DateTimeZone($this->timezone)), $this->locale )); @@ -169,7 +169,7 @@ private function calculatePortugueseRepublicDay(): void if (($this->year >= 1910 && $this->year <= 2012) || $this->year >= 2016) { $this->addHoliday(new Holiday( 'portugueseRepublic', - ['pt_PT' => 'Implantação da República Portuguesa'], + ['pt' => 'Implantação da República Portuguesa'], new DateTime("$this->year-10-05", new DateTimeZone($this->timezone)), $this->locale )); @@ -225,7 +225,7 @@ private function calculateRestorationOfIndependenceDay(): void if (($this->year >= 1850 && $this->year <= 2012) || $this->year >= 2016) { $this->addHoliday(new Holiday( 'restorationOfIndependence', - ['pt_PT' => 'Restauração da Independência'], + ['pt' => 'Restauração da Independência'], new DateTime("$this->year-12-01", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 3e526c3cf..04b9858e2 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -88,10 +88,12 @@ public function initialize(): void */ private function calculateDayAfterNewYearsDay(): void { - $this->addHoliday(new Holiday('dayAfterNewYearsDay', [ - 'en_US' => 'Day after New Year\'s Day', - 'ro_RO' => 'A doua zi după Anul Nou' - ], new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)), $this->locale)); + $this->addHoliday(new Holiday( + 'dayAfterNewYearsDay', + [], + new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)), + $this->locale + )); } /** @@ -114,8 +116,8 @@ private function calculateUnitedPrincipalitiesDay(): void // The law is official since 21.12.2014. if ($this->year > 2014) { $this->addHoliday(new Holiday('unitedPrincipalitiesDay', [ - 'en_US' => 'Union Day / Small Union', - 'ro_RO' => 'Unirea Principatelor Române / Mica Unire' + 'en' => 'Union Day / Small Union', + 'ro' => 'Unirea Principatelor Române / Mica Unire' ], new DateTime("$this->year-01-24", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -136,8 +138,8 @@ private function calculateStAndrewDay(): void { if ($this->year >= 2012) { $this->addHoliday(new Holiday('stAndrewDay', [ - 'en_US' => 'Saint Andrew\'s Day', - 'ro_RO' => 'Sfântul Andrei' + 'en' => 'Saint Andrew\'s Day', + 'ro' => 'Sfântul Andrei' ], new DateTime($this->year . '-11-30', new DateTimeZone($this->timezone)), $this->locale)); } } @@ -177,8 +179,8 @@ private function calculateNationalDay(): void if (\is_string($national_day)) { $this->addHoliday(new Holiday('nationalDay', [ - 'en_US' => 'National Day', - 'ro_RO' => 'Ziua Națională' + 'en' => 'National Day', + 'ro' => 'Ziua Națională' ], new DateTime($national_day, new DateTimeZone($this->timezone)), $this->locale)); } } @@ -200,8 +202,8 @@ private function calculateConstantinBrancusiDay(): void $this->addHoliday(new Holiday( 'constantinBrancusiDay', [ - 'en_US' => 'Constantin Brâncuși day', - 'ro_RO' => 'Ziua Constantin Brâncuși' + 'en' => 'Constantin Brâncuși day', + 'ro' => 'Ziua Constantin Brâncuși' ], new DateTime("$this->year-02-19", new DateTimeZone($this->timezone)), $this->locale, @@ -229,8 +231,8 @@ private function calculateChildrensDay(): void $this->addHoliday(new Holiday( 'childrensDay', [ - 'en_US' => 'International Children\'s Day', - 'ro_RO' => 'Ziua Copilului' + 'en' => 'International Children\'s Day', + 'ro' => 'Ziua Copilului' ], new DateTime("$this->year-06-01", new DateTimeZone($this->timezone)), $this->locale, @@ -240,8 +242,8 @@ private function calculateChildrensDay(): void if ($this->year >= 2017) { $this->addHoliday(new Holiday('childrensDay', [ - 'en_US' => 'International Children\'s Day', - 'ro_RO' => 'Ziua Copilului' + 'en' => 'International Children\'s Day', + 'ro' => 'Ziua Copilului' ], new DateTime("$this->year-06-01", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index 0ae20e48b..236cc6745 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -67,8 +67,8 @@ private function addNewYearsHolidays(): void foreach ($holidayDays as $day) { $this->addHoliday(new Holiday('newYearHolidaysDay' . $day, [ - 'en_US' => 'New Year\'s holidays', - 'ru_RU' => 'Новогодние каникулы' + 'en' => 'New Year\'s holidays', + 'ru' => 'Новогодние каникулы' ], new \DateTime("{$this->year}-01-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); } } @@ -80,8 +80,8 @@ private function addNewYearsHolidays(): void private function addOrthodoxChristmasDay(): void { $this->addHoliday(new Holiday('orthodoxChristmasDay', [ - 'en_US' => 'Orthodox Christmas Day', - 'ru_RU' => 'Рождество' + 'en' => 'Orthodox Christmas Day', + 'ru' => 'Рождество' ], new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -96,8 +96,8 @@ private function addDefenceOfTheFatherlandDay(): void } $this->addHoliday(new Holiday('defenceOfTheFatherlandDay', [ - 'en_US' => 'Defence of the Fatherland Day', - 'ru_RU' => 'День защитника Отечества' + 'en' => 'Defence of the Fatherland Day', + 'ru' => 'День защитника Отечества' ], new \DateTime("{$this->year}-02-23", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -117,8 +117,8 @@ private function addInternationalWomensDay(): void private function addSpringAndLabourDay(): void { $this->addHoliday(new Holiday('springAndLabourDay', [ - 'en_US' => 'Spring and Labour Day', - 'ru_RU' => 'Праздник Весны и Труда' + 'en' => 'Spring and Labour Day', + 'ru' => 'Праздник Весны и Труда' ], new \DateTime("{$this->year}-05-01", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -129,8 +129,8 @@ private function addSpringAndLabourDay(): void private function addVictoryDay(): void { $this->addHoliday(new Holiday('victoryDay', [ - 'en_US' => 'Victory Day', - 'ru_RU' => 'День Победы' + 'en' => 'Victory Day', + 'ru' => 'День Победы' ], new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -145,8 +145,8 @@ private function addRussiaDay(): void } $this->addHoliday(new Holiday('russiaDay', [ - 'en_US' => 'Russia Day', - 'ru_RU' => 'День России' + 'en' => 'Russia Day', + 'ru' => 'День России' ], new \DateTime("{$this->year}-06-12", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -161,8 +161,8 @@ private function addUnityDay(): void } $this->addHoliday(new Holiday('unityDay', [ - 'en_US' => 'Unity Day', - 'ru_RU' => 'День народного единства' + 'en' => 'Unity Day', + 'ru' => 'День народного единства' ], new \DateTime("{$this->year}-11-04", new \DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 3f15f2aa1..c0b482d11 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -122,8 +122,8 @@ private function calculateSlovakIndependenceDay(): void $this->addHoliday(new Holiday( 'slovakIndependenceDay', [ - 'sk_SK' => 'Deň vzniku Slovenskej republiky', - 'en_US' => 'Day of the Establishment of the Slovak Republic' + 'sk' => 'Deň vzniku Slovenskej republiky', + 'en' => 'Day of the Establishment of the Slovak Republic' ], new DateTime($this->year . '-01-01', new DateTimeZone($this->timezone)), $this->locale @@ -147,9 +147,9 @@ private function calculateSaintsCyrilAndMethodiusDay(): void $this->addHoliday(new Holiday( 'saintsCyrilAndMethodiusDay', [ - 'sk_SK' => 'Sviatok svätého Cyrila a Metoda', - 'cs_CZ' => 'Den slovanských věrozvěstů Cyrila a Metoděje', - 'en_US' => 'Saints Cyril and Methodius Day' + 'sk' => 'Sviatok svätého Cyrila a Metoda', + 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', + 'en' => 'Saints Cyril and Methodius Day' ], new DateTime($this->year . '-07-05', new DateTimeZone($this->timezone)), $this->locale, @@ -172,8 +172,8 @@ private function calculateSlovakNationalUprisingDay(): void $this->addHoliday(new Holiday( 'slovakNationalUprisingDay', [ - 'sk_SK' => 'Výročie Slovenského národného povstania', - 'en_US' => 'Slovak National Uprising Day' + 'sk' => 'Výročie Slovenského národného povstania', + 'en' => 'Slovak National Uprising Day' ], new DateTime($this->year . '-08-29', new DateTimeZone($this->timezone)), $this->locale, @@ -196,8 +196,8 @@ private function calculateSlovakConstitutionDay(): void $this->addHoliday(new Holiday( 'slovakConstitutionDay', [ - 'sk_SK' => 'Deň Ústavy Slovenskej republiky', - 'en_US' => 'Day of the Constitution of the Slovak Republic' + 'sk' => 'Deň Ústavy Slovenskej republiky', + 'en' => 'Day of the Constitution of the Slovak Republic' ], new DateTime($this->year . '-09-01', new DateTimeZone($this->timezone)), $this->locale, @@ -222,8 +222,8 @@ private function calculateSlovakConstitutionDay(): void private function calculateOurLadyOfSorrowsDay(): void { $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ - 'sk_SK' => 'Sviatok Sedembolestnej Panny Márie', - 'en_US' => 'Our Lady of Sorrows Day' + 'sk' => 'Sviatok Sedembolestnej Panny Márie', + 'en' => 'Our Lady of Sorrows Day' ], new DateTime($this->year . '-09-15', new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); } @@ -242,9 +242,9 @@ private function calculateStruggleForFreedomAndDemocracyDay(): void $this->addHoliday(new Holiday( 'struggleForFreedomAndDemocracyDay', [ - 'sk_SK' => 'Deň boja za slobodu a demokraciu', - 'cs_CZ' => 'Den boje za svobodu a demokracii', - 'en_US' => 'Struggle for Freedom and Democracy Day' + 'sk' => 'Deň boja za slobodu a demokraciu', + 'cs' => 'Den boje za svobodu a demokracii', + 'en' => 'Struggle for Freedom and Democracy Day' ], new DateTime($this->year . '-11-17', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index c749942fd..d02bc0e8d 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -99,7 +99,7 @@ private function calculateHumanRightsDay(): void { $this->addHoliday(new Holiday( 'humanRightsDay', - ['en_ZA' => 'Human Rights Day'], + ['en' => 'Human Rights Day'], new DateTime($this->year . '-3-21', new DateTimeZone($this->timezone)), $this->locale )); @@ -121,7 +121,7 @@ private function calculateFamilyDay(): void { $this->addHoliday(new Holiday( 'familyDay', - ['en_ZA' => 'Family Day'], + ['en' => 'Family Day'], $this->calculateEaster($this->year, $this->timezone)->add(new DateInterval('P1D')), $this->locale )); @@ -144,7 +144,7 @@ private function calculateFreedomDay(): void { $this->addHoliday(new Holiday( 'freedomDay', - ['en_ZA' => 'Freedom Day'], + ['en' => 'Freedom Day'], new DateTime($this->year . '-4-27', new DateTimeZone($this->timezone)), $this->locale )); @@ -171,7 +171,7 @@ private function calculateYouthDay(): void { $this->addHoliday(new Holiday( 'youthDay', - ['en_ZA' => 'Youth Day'], + ['en' => 'Youth Day'], new DateTime($this->year . '-6-16', new DateTimeZone($this->timezone)), $this->locale )); @@ -198,7 +198,7 @@ private function calculate2016MunicipalElectionsDay(): void $this->addHoliday(new Holiday( '2016MunicipalElectionsDay', - ['en_ZA' => '2016 Municipal Elections Day'], + ['en' => '2016 Municipal Elections Day'], new DateTime('2016-8-3', new DateTimeZone($this->timezone)), $this->locale )); @@ -223,7 +223,7 @@ private function calculateNationalWomensDay(): void { $this->addHoliday(new Holiday( 'nationalWomensDay', - ['en_ZA' => 'National Women\'s Day'], + ['en' => 'National Women\'s Day'], new DateTime($this->year . '-8-9', new DateTimeZone($this->timezone)), $this->locale )); @@ -248,7 +248,7 @@ private function calculateHeritageDay(): void { $this->addHoliday(new Holiday( 'heritageDay', - ['en_ZA' => 'Heritage Day'], + ['en' => 'Heritage Day'], new DateTime($this->year . '-9-24', new DateTimeZone($this->timezone)), $this->locale )); @@ -275,7 +275,7 @@ private function calculateDayOfReconciliation(): void { $this->addHoliday(new Holiday( 'reconciliationDay', - ['en_ZA' => 'Day of Reconciliation'], + ['en' => 'Day of Reconciliation'], new DateTime($this->year . '-12-16', new DateTimeZone($this->timezone)), $this->locale )); @@ -305,7 +305,7 @@ private function calculateSubstituteDayOfGoodwill(): void $this->addHoliday(new Holiday( 'substituteDayOfGoodwill', - ['en_ZA' => 'Day of Goodwill observed'], + ['en' => 'Day of Goodwill observed'], new DateTime('2016-12-27', new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 7216adfe3..8430bbac1 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -172,7 +172,7 @@ public function calculateNewYearsDay(): void if ($this->year <= 1990) { $this->addHoliday(new Holiday( 'twoDaysLaterNewYearsDay', - ['en_US' => 'Two Days Later New Year\'s Day', 'ko_KR' => '새해 연휴'], + ['en' => 'Two Days Later New Year\'s Day', 'ko' => '새해 연휴'], new DateTime("$this->year-1-3", new DateTimeZone($this->timezone)), $this->locale )); @@ -194,7 +194,7 @@ public function calculateSeollal(): void $seollal = new DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], new DateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'seollal', - ['en_US' => 'Seollal', 'ko_KR' => '설날'], + ['en' => 'Seollal', 'ko' => '설날'], $seollal, $this->locale )); @@ -203,7 +203,7 @@ public function calculateSeollal(): void $dayBeforeSeollal->sub(new DateInterval('P1D')); $this->addHoliday(new Holiday( 'dayBeforeSeollal', - ['en_US' => 'Day before Seollal', 'ko_KR' => '설날 연휴'], + ['en' => 'Day before Seollal', 'ko' => '설날 연휴'], $dayBeforeSeollal, $this->locale )); @@ -211,7 +211,7 @@ public function calculateSeollal(): void $dayAfterSeollal->add(new DateInterval('P1D')); $this->addHoliday(new Holiday( 'dayAfterSeollal', - ['en_US' => 'Day after Seollal', 'ko_KR' => '설날 연휴'], + ['en' => 'Day after Seollal', 'ko' => '설날 연휴'], $dayAfterSeollal, $this->locale )); @@ -231,7 +231,7 @@ public function calculateBuddhasBirthday(): void if ($this->year >= 1975 && isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { $this->addHoliday(new Holiday( 'buddhasBirthday', - ['en_US' => 'Buddha\'s Birthday', 'ko_KR' => '부처님오신날'], + ['en' => 'Buddha\'s Birthday', 'ko' => '부처님오신날'], new DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], new DateTimeZone($this->timezone)), $this->locale )); @@ -254,7 +254,7 @@ public function calculateChuseok(): void // Chuseok $chuseok = new Holiday( 'chuseok', - ['en_US' => 'Chuseok', 'ko_KR' => '추석'], + ['en' => 'Chuseok', 'ko' => '추석'], new DateTime(self::LUNAR_HOLIDAY['chuseok'][$this->year], new DateTimeZone($this->timezone)), $this->locale ); @@ -264,7 +264,7 @@ public function calculateChuseok(): void if ($this->year >= 1986) { $this->addHoliday(new Holiday( 'dayAfterChuseok', - ['en_US' => 'Day after Chuseok', 'ko_KR' => '추석 연휴'], + ['en' => 'Day after Chuseok', 'ko' => '추석 연휴'], (clone $chuseok)->add(new DateInterval('P1D')), $this->locale )); @@ -274,7 +274,7 @@ public function calculateChuseok(): void if ($this->year >= 1989) { $this->addHoliday(new Holiday( 'dayBeforeChuseok', - ['en_US' => 'Day before Chuseok', 'ko_KR' => '추석 연휴'], + ['en' => 'Day before Chuseok', 'ko' => '추석 연휴'], (clone $chuseok)->sub(new DateInterval('P1D')), $this->locale )); @@ -294,7 +294,7 @@ public function calculateIndependenceMovementDay(): void if ($this->year >= 1949) { $this->addHoliday(new Holiday( 'independenceMovementDay', - ['en_US' => 'Independence Movement Day', 'ko_KR' => '삼일절'], + ['en' => 'Independence Movement Day', 'ko' => '삼일절'], new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), $this->locale )); @@ -313,7 +313,7 @@ public function calculateArborDay(): void if (($this->year >= 1949 && $this->year < 1960) || ($this->year > 1960 && $this->year < 2006)) { $this->addHoliday(new Holiday( 'arborDay', - ['en_US' => 'Arbor Day', 'ko_KR' => '식목일'], + ['en' => 'Arbor Day', 'ko' => '식목일'], new DateTime("$this->year-4-5", new DateTimeZone($this->timezone)), $this->locale )); @@ -332,7 +332,7 @@ public function calculateChildrensDay(): void if ($this->year >= 1970) { $this->addHoliday(new Holiday( 'childrensDay', - ['en_US' => 'Children\'s Day', 'ko_KR' => '어린이날'], + ['en' => 'Children\'s Day', 'ko' => '어린이날'], new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), $this->locale )); @@ -351,7 +351,7 @@ public function calculateMemorialDay(): void if ($this->year >= 1966) { $this->addHoliday(new Holiday( 'memorialDay', - ['en_US' => 'Memorial Day', 'ko_KR' => '현충일'], + ['en' => 'Memorial Day', 'ko' => '현충일'], new DateTime("$this->year-6-6", new DateTimeZone($this->timezone)), $this->locale )); @@ -373,7 +373,7 @@ public function calculateConstitutionDay(): void if ($this->year >= 1949 && $this->year < 2008) { $this->addHoliday(new Holiday( 'constitutionDay', - ['en_US' => 'Constitution Day', 'ko_KR' => '제헌절'], + ['en' => 'Constitution Day', 'ko' => '제헌절'], new DateTime("$this->year-7-17", new DateTimeZone($this->timezone)), $this->locale )); @@ -392,7 +392,7 @@ public function calculateLiberationDay(): void if ($this->year >= 1949) { $this->addHoliday(new Holiday( 'liberationDay', - ['en_US' => 'Liberation Day', 'ko_KR' => '광복절'], + ['en' => 'Liberation Day', 'ko' => '광복절'], new DateTime("$this->year-8-15", new DateTimeZone($this->timezone)), $this->locale )); @@ -411,7 +411,7 @@ public function calculateArmedForcesDay(): void if ($this->year >= 1956 && $this->year <= 1990) { $this->addHoliday(new Holiday( 'armedForcesDay', - ['en_US' => 'Armed Forces Day', 'ko_KR' => '국군의 날'], + ['en' => 'Armed Forces Day', 'ko' => '국군의 날'], new DateTime("$this->year-10-1", new DateTimeZone($this->timezone)), $this->locale )); @@ -430,7 +430,7 @@ public function calculateNationalFoundationDay(): void if ($this->year >= 1949) { $this->addHoliday(new Holiday( 'nationalFoundationDay', - ['en_US' => 'National Foundation Day', 'ko_KR' => '개천절'], + ['en' => 'National Foundation Day', 'ko' => '개천절'], new DateTime("$this->year-10-3", new DateTimeZone($this->timezone)), $this->locale )); @@ -449,7 +449,7 @@ public function calculateHangulDay(): void if (($this->year >= 1949 && $this->year <= 1990) || $this->year > 2012) { $this->addHoliday(new Holiday( 'hangulDay', - ['en_US' => 'Hangul Day', 'ko_KR' => '한글날'], + ['en' => 'Hangul Day', 'ko' => '한글날'], new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 3a2092854..df629eef9 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -83,7 +83,7 @@ private function calculateNationalDay(): void if ($this->year >= 1981) { $this->addHoliday(new Holiday( 'nationalDay', - ['es_ES' => 'Fiesta Nacional de España'], + ['es' => 'Fiesta Nacional de España'], new DateTime("$this->year-10-12", new DateTimeZone($this->timezone)), $this->locale )); @@ -109,7 +109,7 @@ private function calculateConstitutionDay(): void if ($this->year >= 1978) { $this->addHoliday(new Holiday( 'constitutionDay', - ['es_ES' => 'Día de la Constitución'], + ['es' => 'Día de la Constitución'], new DateTime("$this->year-12-6", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index 4bbd723da..cafb20a67 100755 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -78,7 +78,7 @@ private function calculateAndalusiaDay(): void if ($this->year >= 1980) { $this->addHoliday(new Holiday( 'andalusiaDay', - ['es_ES' => 'Día de Andalucía'], + ['es' => 'Día de Andalucía'], new DateTime("$this->year-2-28", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index f6b3ce503..a3af1fe74 100755 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -80,7 +80,7 @@ private function calculateAsturiasDay(): void if ($this->year >= 1984) { $this->addHoliday(new Holiday( 'asturiasDay', - ['es_ES' => 'Día de Asturias'], + ['es' => 'Día de Asturias'], new DateTime("$this->year-9-8", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index 927882f9d..a3c25a3f9 100755 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -80,7 +80,7 @@ private function calculateBalearicIslandsDay(): void if ($this->year >= 1983) { $this->addHoliday(new Holiday( 'balearicIslandsDay', - ['es_ES' => 'Día de les Illes Balears'], + ['es' => 'Día de les Illes Balears'], new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index 40eb19a09..17acdd4dc 100755 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -80,7 +80,7 @@ private function calculateBasqueCountryDay(): void if ($this->year >= 2011 && $this->year <= 2013) { $this->addHoliday(new Holiday( 'basqueCountryDay', - ['es_ES' => 'Euskadi Eguna'], + ['es' => 'Euskadi Eguna'], new DateTime("$this->year-10-25", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index ae372fa60..51950b6b9 100755 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -79,7 +79,7 @@ private function calculateCanaryIslandsDay(): void if ($this->year >= 1984) { $this->addHoliday(new Holiday( 'canaryIslandsDay', - ['es_ES' => 'Día de las Canarias'], + ['es' => 'Día de las Canarias'], new DateTime("$this->year-5-30", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index 0e7b2d6ed..64beb44b2 100755 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -83,7 +83,7 @@ private function calculateCantabriaDay(): void if ($this->year >= 1967) { $this->addHoliday(new Holiday( 'cantabriaDay', - ['es_ES' => 'Día de Cantabria'], + ['es' => 'Día de Cantabria'], new DateTime("second sunday of august $this->year", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index 3e0fd573c..2a798fdf7 100755 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -80,7 +80,7 @@ private function calculateCastileAndLeonDay(): void if ($this->year >= 1976) { $this->addHoliday(new Holiday( 'castileAndLeonDay', - ['es_ES' => 'Día de Castilla y León'], + ['es' => 'Día de Castilla y León'], new DateTime("$this->year-4-23", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index 11b379504..e5a590d13 100755 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -83,7 +83,7 @@ private function calculateCastillaLaManchaDay(): void if ($this->year >= 1984) { $this->addHoliday(new Holiday( 'castillaLaManchaDay', - ['es_ES' => 'Día de la Región Castilla-La Mancha'], + ['es' => 'Día de la Región Castilla-La Mancha'], new DateTime("$this->year-5-31", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index fe68573c0..e62463917 100755 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -83,7 +83,7 @@ private function calculateNationalDayOfCatalonia(): void if ($this->year >= 1886) { $this->addHoliday(new Holiday( 'nationalCataloniaDay', - ['es_ES' => 'Diada Nacional de Catalunya'], + ['es' => 'Diada Nacional de Catalunya'], new DateTime("$this->year-9-11", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index 7cb2b43ab..de8807b7c 100755 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -77,7 +77,7 @@ private function calculateDayOfCeuta(): void if ($this->year >= 1416) { $this->addHoliday(new Holiday( 'ceutaDay', - ['es_ES' => 'Día de Ceuta'], + ['es' => 'Día de Ceuta'], new DateTime("$this->year-9-2", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index 618d6f99f..848857e76 100755 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -83,7 +83,7 @@ private function calculateDosdeMayoUprisingDay(): void { $this->addHoliday(new Holiday( 'dosdeMayoUprisingDay', - ['es_ES' => 'Fiesta de la Comunidad de Madrid'], + ['es' => 'Fiesta de la Comunidad de Madrid'], new DateTime("$this->year-5-2", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index c62e08fc6..0433440fe 100755 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -80,7 +80,7 @@ private function calculateDayOfExtremadura(): void if ($this->year >= 1985) { $this->addHoliday(new Holiday( 'extremaduraDay', - ['es_ES' => 'Día de Extremadura'], + ['es' => 'Día de Extremadura'], new DateTime("$this->year-9-8", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index f7afe801a..470725923 100755 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -80,8 +80,8 @@ private function calculateGalicianLiteratureDay(): void { if ($this->year >= 1991) { $this->addHoliday(new Holiday('galicianLiteratureDay', [ - 'es_ES' => 'Día de las Letras Gallegas', - 'gl_ES' => 'Día das Letras Galegas' + 'es' => 'Día de las Letras Gallegas', + 'gl' => 'Día das Letras Galegas' ], new DateTime("$this->year-5-17", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -108,7 +108,7 @@ private function calculateStJamesDay(): void { if ($this->year >= 2000) { $this->addHoliday(new Holiday('stJamesDay', [ - 'es_ES' => 'Santiago Apostol' + 'es' => 'Santiago Apostol' ], new DateTime("$this->year-7-25", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 141ac32f9..b3bc121b2 100755 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -76,7 +76,7 @@ private function calculateLaRiojaDay(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('laRiojaDay', [ - 'es_ES' => 'Día de La Rioja' + 'es' => 'Día de La Rioja' ], new DateTime("$this->year-6-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index ce675cf20..da3abb174 100755 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -77,7 +77,7 @@ private function calculateDayOfMurcia(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('murciaDay', [ - 'es_ES' => 'Día de la Región de Murcia' + 'es' => 'Día de la Región de Murcia' ], new DateTime("$this->year-6-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index 0950ea20a..5ed7930a6 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -84,7 +84,7 @@ private function calculateValencianCommunityDay(): void { if ($this->year >= 1239) { $this->addHoliday(new Holiday('valencianCommunityDay', [ - 'es_ES' => 'Día de la Comunidad Valenciana' + 'es' => 'Día de la Comunidad Valenciana' ], new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 7d03a0a89..56678f23c 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -233,7 +233,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', - ['sv_SE' => $holiday_name], + ['sv' => $holiday_name], new DateTime("$this->year-6-6", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index e164c615d..9232a179f 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -65,14 +65,11 @@ public function initialize(): void private function calculateNationalDay(): void { $translations = [ - 'en_US' => 'National Day', - 'fr_FR' => 'Jour de la fête nationale', - 'fr_CH' => 'Jour de la fête nationale', - 'de_DE' => 'Bundesfeiertag', - 'de_CH' => 'Bundesfeiertag', - 'it_IT' => 'Giorno festivo federale', - 'it_CH' => 'Giorno festivo federale', - 'rm_CH' => 'Fiasta naziunala' + 'en' => 'National Day', + 'fr' => 'Jour de la fête nationale', + 'de' => 'Bundesfeiertag', + 'it' => 'Giorno festivo federale', + 'rm' => 'Fiasta naziunala' ]; if ($this->year >= 1994) { $this->addHoliday(new Holiday( @@ -112,11 +109,9 @@ public function calculateBerchtoldsTag(): void $this->addHoliday(new Holiday( 'berchtoldsTag', [ - 'de_DE' => 'Berchtoldstag', - 'de_CH' => 'Berchtoldstag', - 'fr_FR' => 'Jour de la Saint-Berthold', - 'fr_CH' => 'Jour de la Saint-Berthold', - 'en_US' => 'Berchtoldstag' + 'de' => 'Berchtoldstag', + 'fr' => 'Jour de la Saint-Berthold', + 'en' => 'Berchtoldstag' ], new DateTime($this->year . '-01-02', new DateTimeZone($this->timezone)), $this->locale, @@ -148,12 +143,9 @@ public function calculateBettagsMontag(): void $date->add(new DateInterval('P1D')); $this->addHoliday(new Holiday('bettagsMontag', [ - 'fr_FR' => 'Jeûne fédéral', - 'fr_CH' => 'Jeûne fédéral', - 'de_DE' => 'Eidgenössischer Dank-, Buss- und Bettag', - 'de_CH' => 'Eidgenössischer Dank-, Buss- und Bettag', - 'it_IT' => 'Festa federale di ringraziamento, pentimento e preghiera', - 'it_CH' => 'Festa federale di ringraziamento, pentimento e preghiera' + 'fr' => 'Jeûne fédéral', + 'de' => 'Eidgenössischer Dank-, Buss- und Bettag', + 'it' => 'Festa federale di ringraziamento, pentimento e preghiera', ], $date, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index 5a9de3df3..6c14781f3 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -81,13 +81,11 @@ private function calculateJeuneGenevois(): void if (($this->year >= 1840 && $this->year <= 1869) || $this->year >= 1966) { $this->addHoliday(new Holiday('jeuneGenevois', [ - 'fr_FR' => 'Jeûne genevois', - 'fr_CH' => 'Jeûne genevois' + 'fr' => 'Jeûne genevois', ], $date, $this->locale, Holiday::TYPE_OTHER)); } elseif ($this->year > 1869 && $this->year < 1966) { $this->addHoliday(new Holiday('jeuneGenevois', [ - 'fr_FR' => 'Jeûne genevois', - 'fr_CH' => 'Jeûne genevois' + 'fr' => 'Jeûne genevois', ], $date, $this->locale, Holiday::TYPE_OBSERVANCE)); } } @@ -113,8 +111,7 @@ private function calculateRestaurationGenevoise(): void $this->addHoliday(new Holiday( 'restaurationGenevoise', [ - 'fr_FR' => 'Restauration de la République', - 'fr_CH' => 'Restauration de la République' + 'fr' => 'Restauration de la République' ], new DateTime($this->year . '-12-31', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index c492f9a15..15163b4b1 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -79,8 +79,7 @@ private function calculateNafelserFahrt(): void if ($this->year >= 1389) { $date = new DateTime('First Thursday of ' . $this->year . '-04', new DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('nafelserFahrt', [ - 'de_DE' => 'Näfelser Fahrt', - 'de_CH' => 'Näfelser Fahrt' + 'de' => 'Näfelser Fahrt', ], $date, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index 90259b5d5..0600f5e63 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -83,8 +83,7 @@ private function calculatePlebisciteJurassien(): void $this->addHoliday(new Holiday( 'plebisciteJurassien', [ - 'fr_FR' => 'Commémoration du plébiscite jurassien', - 'fr_CH' => 'Commémoration du plébiscite jurassien' + 'fr' => 'Commémoration du plébiscite jurassien', ], new DateTime($this->year . '-06-23', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index 3420d7908..88fca00e2 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -81,8 +81,7 @@ private function calculateInstaurationRepublique(): void $this->addHoliday(new Holiday( 'instaurationRepublique', [ - 'fr_FR' => 'Instauration de la République', - 'fr_CH' => 'Instauration de la République' + 'fr' => 'Instauration de la République' ], new DateTime($this->year . '-03-01', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index 19e6fc186..51b1cf306 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -85,8 +85,7 @@ private function calculateBruderKlausenFest(): void $this->addHoliday(new Holiday( 'bruderKlausenFest', [ - 'de_DE' => 'Bruder-Klausen-Fest', - 'de_CH' => 'Bruder-Klausen-Fest' + 'de' => 'Bruder-Klausen-Fest' ], new DateTime($this->year . '-09-25', new DateTimeZone($this->timezone)), $this->locale, @@ -96,8 +95,7 @@ private function calculateBruderKlausenFest(): void $this->addHoliday(new Holiday( 'bruderKlausenFest', [ - 'de_DE' => 'Bruder-Klausen-Fest', - 'de_CH' => 'Bruder-Klausen-Fest' + 'de' => 'Bruder-Klausen-Fest', ], new DateTime($this->year . '-09-21', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Ticino.php b/src/Yasumi/Provider/Switzerland/Ticino.php index 81289414e..57c92c0d2 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -89,13 +89,10 @@ private function calculateStPeterPaul(): void $this->addHoliday(new Holiday( 'stPeterPaul', [ - 'it_IT' => 'Santi Pietro e Paolo', - 'it_CH' => 'Santi Pietro e Paolo', - 'en_US' => 'Feast of Saints Peter and Paul', - 'fr_FR' => 'Solennité des saints Pierre et Paul', - 'fr_CH' => 'Solennité des saints Pierre et Paul', - 'de_DE' => 'St. Peter und Paul', - 'de_CH' => 'St. Peter und Paul' + 'it' => 'Santi Pietro e Paolo', + 'en' => 'Feast of Saints Peter and Paul', + 'fr' => 'Solennité des saints Pierre et Paul', + 'de' => 'St. Peter und Paul', ], new DateTime($this->year . '-06-29', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index c7cbb07f1..134b688be 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -78,7 +78,7 @@ private function calculateMartinLutherKingday(): void { if ($this->year >= 1986) { $this->addHoliday(new Holiday('martinLutherKingDay', [ - 'en_US' => 'Dr. Martin Luther King Jr\'s Birthday' + 'en' => 'Dr. Martin Luther King Jr\'s Birthday' ], new DateTime("third monday of january $this->year", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -106,7 +106,7 @@ private function calculateWashingtonsBirthday(): void $date = new DateTime("third monday of february $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('washingtonsBirthday', [ - 'en_US' => 'Washington\'s Birthday' + 'en' => 'Washington\'s Birthday' ], $date, $this->locale)); } } @@ -131,7 +131,7 @@ private function calculateMemorialDay(): void $date = new DateTime("last monday of may $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('memorialDay', [ - 'en_US' => 'Memorial Day' + 'en' => 'Memorial Day' ], $date, $this->locale)); } } @@ -152,7 +152,7 @@ private function calculateIndependenceDay(): void { if ($this->year >= 1776) { $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day' + 'en' => 'Independence Day' ], new DateTime("$this->year-7-4", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -173,7 +173,7 @@ private function calculateLabourDay(): void $this->addHoliday(new Holiday( 'labourDay', [ - 'en_US' => 'Labour Day' + 'en' => 'Labour Day' ], new DateTime("first monday of september $this->year", new DateTimeZone($this->timezone)), $this->locale @@ -202,7 +202,7 @@ private function calculateColumbusDay(): void $date = new DateTime("second monday of october $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('columbusDay', [ - 'en_US' => 'Columbus Day' + 'en' => 'Columbus Day' ], $date, $this->locale)); } } @@ -224,7 +224,7 @@ private function calculateVeteransDay(): void $name = $this->year < 1954 ? 'Armistice Day' : 'Veterans Day'; $this->addHoliday(new Holiday('veteransDay', [ - 'en_US' => $name + 'en' => $name ], new DateTime("$this->year-11-11", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -247,7 +247,7 @@ private function calculateThanksgivingDay(): void $this->addHoliday(new Holiday( 'thanksgivingDay', [ - 'en_US' => 'Thanksgiving Day' + 'en' => 'Thanksgiving Day' ], new DateTime("fourth thursday of november $this->year", new DateTimeZone($this->timezone)), $this->locale diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index fd50dbe39..778a184f8 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -95,8 +95,8 @@ private function calculateChristmasDay(): void private function calculateSecondInternationalWorkersDay(): void { $this->addHoliday(new Holiday('secondInternationalWorkersDay', [ - 'uk_UA' => 'День міжнародної солідарності трудящих', - 'ru_UA' => 'День международной солидарности трудящихся' + 'uk' => 'День міжнародної солідарності трудящих', + 'ru' => 'День международной солидарности трудящихся' ], new \DateTime("$this->year-05-02", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -120,7 +120,7 @@ private function calculateVictoryDay(): void { $this->addHoliday(new Holiday( 'victoryDay', - ['uk_UA' => 'День перемоги', 'ru_UA' => 'День победы'], + ['uk' => 'День перемоги', 'ru' => 'День победы'], new \DateTime("$this->year-05-09", new \DateTimeZone($this->timezone)), $this->locale )); @@ -146,7 +146,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', - ['uk_UA' => 'День Конституції', 'ru_UA' => 'День Конституции'], + ['uk' => 'День Конституції', 'ru' => 'День Конституции'], new \DateTime("$this->year-06-28", new \DateTimeZone($this->timezone)), $this->locale )); @@ -174,7 +174,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday( 'independenceDay', - ['uk_UA' => 'День Незалежності', 'ru_UA' => 'День Независимости'], + ['uk' => 'День Незалежності', 'ru' => 'День Независимости'], new \DateTime("$this->year-08-24", new \DateTimeZone($this->timezone)), $this->locale )); @@ -203,7 +203,7 @@ private function calculateDefenderOfUkraineDay(): void $this->addHoliday(new Holiday( 'defenderOfUkraineDay', - ['uk_UA' => 'День захисника України', 'ru_UA' => 'День Защитника Украины'], + ['uk' => 'День захисника України', 'ru' => 'День Защитника Украины'], new \DateTime("$this->year-10-14", new \DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 4bdb861dc..38cb93c8d 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -125,7 +125,7 @@ private function calculateMayDayBankHoliday(): void if (1995 === $this->year || 2020 === $this->year) { $this->addHoliday(new Holiday( 'mayDayBankHoliday', - ['en_GB' => 'May Day Bank Holiday'], + ['en' => 'May Day Bank Holiday'], new DateTime("$this->year-5-8", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -136,7 +136,7 @@ private function calculateMayDayBankHoliday(): void $this->addHoliday(new Holiday( 'mayDayBankHoliday', - ['en_GB' => 'May Day Bank Holiday'], + ['en' => 'May Day Bank Holiday'], new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -171,7 +171,7 @@ private function calculateSpringBankHoliday(): void if (2002 === $this->year || 2012 === $this->year) { $this->addHoliday(new Holiday( 'springBankHoliday', - ['en_GB' => 'Spring Bank Holiday'], + ['en' => 'Spring Bank Holiday'], new DateTime("$this->year-6-4", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -182,7 +182,7 @@ private function calculateSpringBankHoliday(): void $this->addHoliday(new Holiday( 'springBankHoliday', - ['en_GB' => 'Spring Bank Holiday'], + ['en' => 'Spring Bank Holiday'], new DateTime("last monday of may $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -214,7 +214,7 @@ private function calculateSummerBankHoliday(): void if ($this->year < 1965) { $this->addHoliday(new Holiday( 'summerBankHoliday', - ['en_GB' => 'August Bank Holiday'], + ['en' => 'August Bank Holiday'], new DateTime("first monday of august $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -229,7 +229,7 @@ private function calculateSummerBankHoliday(): void if (1968 === $this->year || 1969 === $this->year) { $this->addHoliday(new Holiday( 'summerBankHoliday', - ['en_GB' => 'Summer Bank Holiday'], + ['en' => 'Summer Bank Holiday'], new DateTime("first monday of september $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -240,7 +240,7 @@ private function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', - ['en_GB' => 'Summer Bank Holiday'], + ['en' => 'Summer Bank Holiday'], new DateTime("last monday of august $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 0524519dd..f4c5d879a 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -297,4 +297,19 @@ public static function prevWorkingDay( return $date; } + + /** + * Returns the parent locales for the specified locale. + * + * @return array All ancestor locales starting with the direct parent + */ + public static function getParentLocales(string $locale): array + { + $locales = []; + $parts = \explode('_', $locale); + while (\array_pop($parts) && $parts) { + $locales[] = \implode('_', $parts); + } + return $locales; + } } diff --git a/src/Yasumi/data/locales.php b/src/Yasumi/data/locales.php index 6fa1c48a7..ca370f6be 100644 --- a/src/Yasumi/data/locales.php +++ b/src/Yasumi/data/locales.php @@ -12,11 +12,16 @@ // List of possible locales. This list is used in case the 'intl' extension is not loaded/available. return [ + 'af', 'af_NA', 'af_ZA', + 'agq', 'agq_CM', + 'ak', 'ak_GH', + 'am', 'am_ET', + 'ar', 'ar_AE', 'ar_BH', 'ar_DJ', @@ -44,47 +49,74 @@ 'ar_TD', 'ar_TN', 'ar_YE', + 'as', 'as_IN', + 'asa', 'asa_TZ', + 'ast', 'ast_ES', + 'az', 'az_Cyrl', 'az_Cyrl_AZ', 'az_Latn', 'az_Latn_AZ', + 'bas', 'bas_CM', + 'be', 'be_BY', + 'bem', 'bem_ZM', + 'bez', 'bez_TZ', + 'bg', 'bg_BG', + 'bm', 'bm_ML', + 'bn', 'bn_BD', 'bn_IN', + 'bo', 'bo_CN', 'bo_IN', + 'br', 'br_FR', + 'brx', 'brx_IN', + 'bs', 'bs_Cyrl', 'bs_Cyrl_BA', 'bs_Latn', 'bs_Latn_BA', + 'ca', 'ca_AD', 'ca_ES', 'ca_ES_VALENCIA', 'ca_FR', 'ca_IT', + 'ccp', 'ccp_BD', 'ccp_IN', + 'ce', 'ce_RU', + 'cgg', 'cgg_UG', + 'chr', 'chr_US', + 'ckb', 'ckb_IQ', 'ckb_IR', + 'cs', 'cs_CZ', + 'cu', 'cu_RU', + 'cy', 'cy_GB', + 'da', 'da_DK', 'da_GL', + 'dav', 'dav_KE', + 'de', 'de_AT', 'de_BE', 'de_CH', @@ -92,16 +124,25 @@ 'de_IT', 'de_LI', 'de_LU', + 'dje', 'dje_NE', + 'dsb', 'dsb_DE', + 'dua', 'dua_CM', + 'dyo', 'dyo_SN', + 'dz', 'dz_BT', + 'ebu', 'ebu_KE', + 'ee', 'ee_GH', 'ee_TG', + 'el', 'el_CY', 'el_GR', + 'en', 'en_AG', 'en_AI', 'en_AS', @@ -204,6 +245,7 @@ 'en_ZA', 'en_ZM', 'en_ZW', + 'es', 'es_AR', 'es_BO', 'es_BR', @@ -231,11 +273,16 @@ 'es_US', 'es_UY', 'es_VE', + 'et', 'et_EE', + 'eu', 'eu_ES', + 'ewo', 'ewo_CM', + 'fa', 'fa_AF', 'fa_IR', + 'ff', 'ff_CM', 'ff_GN', 'ff_Latn', @@ -253,10 +300,14 @@ 'ff_Latn_SN', 'ff_MR', 'ff_SN', + 'fi', 'fi_FI', + 'fil', 'fil_PH', + 'fo', 'fo_DK', 'fo_FO', + 'fr', 'fr_BE', 'fr_BF', 'fr_BI', @@ -303,107 +354,190 @@ 'fr_VU', 'fr_WF', 'fr_YT', + 'fur', 'fur_IT', + 'fy', 'fy_NL', + 'ga', 'ga_IE', + 'gd', 'gd_GB', + 'gl', 'gl_ES', + 'gsw', 'gsw_CH', 'gsw_FR', 'gsw_LI', + 'gu', 'gu_IN', + 'guz', 'guz_KE', + 'gv', 'gv_IM', + 'ha', 'ha_GH', 'ha_NE', 'ha_NG', + 'haw', 'haw_US', + 'he', 'he_IL', + 'hi', 'hi_IN', + 'hr', 'hr_BA', 'hr_HR', + 'hsb', 'hsb_DE', + 'hu', 'hu_HU', + 'hy', 'hy_AM', + 'ia', 'ia_001', + 'id', 'id_ID', + 'ig', 'ig_NG', + 'ii', 'ii_CN', + 'is', 'is_IS', + 'it', 'it_CH', 'it_IT', 'it_SM', 'it_VA', + 'ja', 'ja_JP', + 'jgo', 'jgo_CM', + 'jmc', 'jmc_TZ', + 'jv', 'jv_ID', + 'ka', 'ka_GE', + 'kab', 'kab_DZ', + 'kam', 'kam_KE', + 'kde', 'kde_TZ', + 'kea', 'kea_CV', + 'khq', 'khq_ML', + 'ki', 'ki_KE', + 'kk', 'kk_KZ', + 'kkj', 'kkj_CM', + 'kl', 'kl_GL', + 'kln', 'kln_KE', + 'km', 'km_KH', + 'kn', 'kn_IN', + 'ko', 'ko_KP', 'ko_KR', + 'kok', 'kok_IN', + 'ks', 'ks_IN', + 'ksb', 'ksb_TZ', + 'ksf', 'ksf_CM', + 'ksh', 'ksh_DE', + 'ku', 'ku_TR', + 'kw', 'kw_GB', + 'ky', 'ky_KG', + 'lag', 'lag_TZ', + 'lb', 'lb_LU', + 'lg', 'lg_UG', + 'lkt', 'lkt_US', + 'ln', 'ln_AO', 'ln_CD', 'ln_CF', 'ln_CG', + 'lo', 'lo_LA', + 'lrc', 'lrc_IQ', 'lrc_IR', + 'lt', 'lt_LT', + 'lu', 'lu_CD', + 'luo', 'luo_KE', + 'luy', 'luy_KE', + 'lv', 'lv_LV', + 'mas', 'mas_KE', 'mas_TZ', + 'mer', 'mer_KE', + 'mfe', 'mfe_MU', + 'mg', 'mg_MG', + 'mgh', 'mgh_MZ', + 'mgo', 'mgo_CM', + 'mi', 'mi_NZ', + 'mk', 'mk_MK', + 'ml', 'ml_IN', + 'mn', 'mn_MN', + 'mr', 'mr_IN', + 'ms', 'ms_BN', 'ms_MY', 'ms_SG', + 'mt', 'mt_MT', + 'mua', 'mua_CM', + 'my', 'my_MM', + 'mzn', 'mzn_IR', + 'naq', 'naq_NA', + 'nb', 'nb_NO', 'nb_SJ', + 'nd', 'nd_ZW', + 'nds', 'nds_DE', 'nds_NL', + 'ne', 'ne_IN', 'ne_NP', + 'nl', 'nl_AW', 'nl_BE', 'nl_BQ', @@ -411,22 +545,34 @@ 'nl_NL', 'nl_SR', 'nl_SX', + 'nmg', 'nmg_CM', + 'nn', 'nn_NO', + 'nnh', 'nnh_CM', + 'nus', 'nus_SS', + 'nyn', 'nyn_UG', + 'om', 'om_ET', 'om_KE', + 'or', 'or_IN', + 'os', 'os_GE', 'os_RU', + 'pa', 'pa_Arab', 'pa_Arab_PK', 'pa_Guru', 'pa_Guru_IN', + 'pl', 'pl_PL', + 'ps', 'ps_AF', + 'pt', 'pt_AO', 'pt_BR', 'pt_CH', @@ -439,48 +585,73 @@ 'pt_PT', 'pt_ST', 'pt_TL', + 'qu', 'qu_BO', 'qu_EC', 'qu_PE', + 'rm', 'rm_CH', + 'rn', 'rn_BI', + 'ro', 'ro_MD', 'ro_RO', + 'rof', 'rof_TZ', + 'ru', 'ru_BY', 'ru_KG', 'ru_KZ', 'ru_MD', 'ru_RU', 'ru_UA', + 'rw', 'rw_RW', + 'rwk', 'rwk_TZ', + 'sah', 'sah_RU', + 'saq', 'saq_KE', + 'sbp', 'sbp_TZ', + 'sd', 'sd_PK', + 'se', 'se_FI', 'se_NO', 'se_SE', + 'seh', 'seh_MZ', + 'ses', 'ses_ML', + 'sg', 'sg_CF', + 'shi', 'shi_Latn', 'shi_Latn_MA', 'shi_Tfng', 'shi_Tfng_MA', + 'si', 'si_LK', + 'sk', 'sk_SK', + 'sl', 'sl_SI', + 'smn', 'smn_FI', + 'sn', 'sn_ZW', + 'so', 'so_DJ', 'so_ET', 'so_KE', 'so_SO', + 'sq', 'sq_AL', 'sq_MK', 'sq_XK', + 'sr', 'sr_Cyrl', 'sr_Cyrl_BA', 'sr_Cyrl_ME', @@ -491,60 +662,90 @@ 'sr_Latn_ME', 'sr_Latn_RS', 'sr_Latn_XK', + 'sv', 'sv_AX', 'sv_FI', 'sv_SE', + 'sw', 'sw_CD', 'sw_KE', 'sw_TZ', 'sw_UG', + 'ta', 'ta_IN', 'ta_LK', 'ta_MY', 'ta_SG', + 'te', 'te_IN', + 'teo', 'teo_KE', 'teo_UG', + 'tg', 'tg_TJ', + 'th', 'th_TH', + 'ti', 'ti_ER', 'ti_ET', + 'tk', 'tk_TM', + 'to', 'to_TO', + 'tr', 'tr_CY', 'tr_TR', + 'tt', 'tt_RU', + 'twq', 'twq_NE', + 'tzm', 'tzm_MA', + 'ug', 'ug_CN', + 'uk', 'uk_UA', + 'ur', 'ur_IN', 'ur_PK', + 'uz', 'uz_Arab', 'uz_Arab_AF', 'uz_Cyrl', 'uz_Cyrl_UZ', 'uz_Latn', 'uz_Latn_UZ', + 'vai', 'vai_Latn', 'vai_Latn_LR', 'vai_Vaii', 'vai_Vaii_LR', + 'vi', 'vi_VN', + 'vun', 'vun_TZ', + 'wae', 'wae_CH', + 'wo', 'wo_SN', + 'xh', 'xh_ZA', + 'xog', 'xog_UG', + 'yav', 'yav_CM', + 'yo', 'yo_BJ', 'yo_NG', + 'yue', 'yue_HK', 'yue_Hans', 'yue_Hans_CN', 'yue_Hant', 'yue_Hant_HK', + 'zgh', 'zgh_MA', + 'zh', 'zh_Hans', 'zh_Hans_CN', 'zh_Hans_HK', @@ -554,5 +755,6 @@ 'zh_Hant_HK', 'zh_Hant_MO', 'zh_Hant_TW', + 'zu', 'zu_ZA' ]; diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index 26f90e770..3c9effb5c 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -12,26 +12,22 @@ // Translations for All Saints' Day return [ - 'de_AT' => 'Allerheiligen', - 'de_CH' => 'Allerheiligen', - 'de_DE' => 'Allerheiligen', - 'el_GR' => 'Άγιοι Πάντες', - 'en_US' => 'All Saints\' Day', - 'es_ES' => 'Día de todos los Santos', - 'fi_FI' => 'Pyhäinpäivä', + 'de' => 'Allerheiligen', + 'el' => 'Άγιοι Πάντες', + 'en' => 'All Saints\' Day', + 'es' => 'Día de todos los Santos', + 'fi' => 'Pyhäinpäivä', 'fr_BE' => 'La Toussaint', - 'fr_CH' => 'Toussaint', - 'fr_FR' => 'Toussaint', - 'hr_HR' => 'Dan svih svetih', - 'hu_HU' => 'Mindenszentek', + 'fr' => 'Toussaint', + 'hr' => 'Dan svih svetih', + 'hu' => 'Mindenszentek', + 'it' => 'Festa di Tutti i Santi', 'it_CH' => 'Ognissanti', - 'it_IT' => 'Festa di Tutti i Santi', - 'lt_LT' => 'Visų šventųjų diena (Vėlinės)', - 'nl_BE' => 'Allerheiligen', - 'nl_NL' => 'Allerheiligen', - 'pl_PL' => 'Uroczystość Wszystkich Świętych', - 'pt_PT' => 'Dia de todos os Santos', - 'ro_RO' => 'Ziua tuturor sfinților', - 'sk_SK' => 'Sviatok Všetkých svätých', - 'sv_SE' => 'alla helgons dag' + 'lt' => 'Visų šventųjų diena (Vėlinės)', + 'nl' => 'Allerheiligen', + 'pl' => 'Uroczystość Wszystkich Świętych', + 'pt' => 'Dia de todos os Santos', + 'ro' => 'Ziua tuturor sfinților', + 'sk' => 'Sviatok Všetkých svätých', + 'sv' => 'alla helgons dag' ]; diff --git a/src/Yasumi/data/translations/allSaintsEve.php b/src/Yasumi/data/translations/allSaintsEve.php index 7c7c51d83..f579546d7 100755 --- a/src/Yasumi/data/translations/allSaintsEve.php +++ b/src/Yasumi/data/translations/allSaintsEve.php @@ -12,7 +12,7 @@ // Translations for All Saints' Eve return [ - 'da_DK' => 'Allehelgensaften', - 'en_US' => 'All Saints\' Eve', - 'sv_SE' => 'alla helgons afton' + 'da' => 'Allehelgensaften', + 'en' => 'All Saints\' Eve', + 'sv' => 'alla helgons afton' ]; diff --git a/src/Yasumi/data/translations/annunciation.php b/src/Yasumi/data/translations/annunciation.php index b10e2e5ef..1a8f148b0 100644 --- a/src/Yasumi/data/translations/annunciation.php +++ b/src/Yasumi/data/translations/annunciation.php @@ -12,8 +12,7 @@ // Translations for Annunciation return [ - 'el_GR' => 'Ευαγγελισμός της Θεοτόκου', - 'en_US' => 'Annunciation', - 'fr_BE' => 'Annonciation', - 'fr_FR' => 'Annonciation' + 'el' => 'Ευαγγελισμός της Θεοτόκου', + 'en' => 'Annunciation', + 'fr' => 'Annonciation', ]; diff --git a/src/Yasumi/data/translations/anzacDay.php b/src/Yasumi/data/translations/anzacDay.php index aed012ea8..547d38a5c 100644 --- a/src/Yasumi/data/translations/anzacDay.php +++ b/src/Yasumi/data/translations/anzacDay.php @@ -12,7 +12,5 @@ // Translations for ANZAC Day return [ - 'en_AU' => 'ANZAC Day', - 'en_NZ' => 'ANZAC Day', - 'en_US' => 'ANZAC Day' + 'en' => 'ANZAC Day' ]; diff --git a/src/Yasumi/data/translations/armisticeDay.php b/src/Yasumi/data/translations/armisticeDay.php index 8834e592d..6acfb7958 100644 --- a/src/Yasumi/data/translations/armisticeDay.php +++ b/src/Yasumi/data/translations/armisticeDay.php @@ -12,9 +12,9 @@ // Translations for Armistice Day return [ - 'el_GR' => 'Ημέρα Ανακωχής', - 'en_US' => 'Armistice Day', - 'fr_BE' => 'Armistice', + 'el' => 'Ημέρα Ανακωχής', + 'en' => 'Armistice Day', + 'fr' => 'Armistice', 'fr_FR' => 'Armistice 1918', - 'nl_BE' => 'Wapenstilstand' + 'nl' => 'Wapenstilstand' ]; diff --git a/src/Yasumi/data/translations/ascensionDay.php b/src/Yasumi/data/translations/ascensionDay.php index 0a2c96f9c..f0e7cd368 100644 --- a/src/Yasumi/data/translations/ascensionDay.php +++ b/src/Yasumi/data/translations/ascensionDay.php @@ -12,19 +12,15 @@ // Translations for Ascension Day return [ - 'da_DK' => 'Kristi himmelfartsdag', - 'de_AT' => 'Christi Himmelfahrt', + 'da' => 'Kristi himmelfartsdag', + 'de' => 'Christi Himmelfahrt', 'de_CH' => 'Auffahrt', - 'de_DE' => 'Christi Himmelfahrt', - 'el_GR' => 'Ανάληψη του Χριστού', - 'en_US' => 'Ascension Day', - 'fi_FI' => 'Helatorstai', - 'fr_BE' => 'Ascension', - 'fr_CH' => 'Ascension', - 'fr_FR' => 'Ascension', - 'it_CH' => 'Ascensione', - 'nb_NO' => 'Kristi himmelfartsdag', - 'nl_BE' => 'Hemelvaart', - 'nl_NL' => 'Hemelvaart', - 'sv_SE' => 'Kristi himmelsfärdsdag' + 'el' => 'Ανάληψη του Χριστού', + 'en' => 'Ascension Day', + 'fi' => 'Helatorstai', + 'fr' => 'Ascension', + 'it' => 'Ascensione', + 'nb' => 'Kristi himmelfartsdag', + 'nl' => 'Hemelvaart', + 'sv' => 'Kristi himmelsfärdsdag' ]; diff --git a/src/Yasumi/data/translations/ashWednesday.php b/src/Yasumi/data/translations/ashWednesday.php index a108449e9..9a4015336 100644 --- a/src/Yasumi/data/translations/ashWednesday.php +++ b/src/Yasumi/data/translations/ashWednesday.php @@ -12,13 +12,11 @@ // Translations for Ash Wednesday return [ - 'de_CH' => 'Aschermittwoch', - 'en_US' => 'Ash Wednesday', - 'es_ES' => 'Miércoles de Ceniza', - 'fr_BE' => 'Mercredi des Cendres', - 'fr_CH' => 'Mercredi des Cendres', - 'it_CH' => 'Mercoledi delle Ceneri', - 'nl_BE' => 'Aswoensdag', - 'nl_NL' => 'Aswoensdag', - 'pt_BR' => 'Quarta-feira de Cinzas' + 'de' => 'Aschermittwoch', + 'en' => 'Ash Wednesday', + 'es' => 'Miércoles de Ceniza', + 'fr' => 'Mercredi des Cendres', + 'it' => 'Mercoledi delle Ceneri', + 'nl' => 'Aswoensdag', + 'pt' => 'Quarta-feira de Cinzas' ]; diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index 46079fb53..059d12b5c 100755 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -12,23 +12,18 @@ // Translations for Assumption of Mary return [ - 'de_AT' => 'Mariä Himmelfahrt', - 'de_CH' => 'Mariä Himmelfahrt', - 'de_DE' => 'Mariä Himmelfahrt', - 'el_GR' => 'Κοίμηση της Θεοτόκου', - 'en_US' => 'Assumption of Mary', - 'es_ES' => 'Asunción de la Virgen María', - 'fr_BE' => 'Assomption', - 'fr_CH' => 'Assomption', - 'fr_FR' => 'Assomption', - 'hr_HR' => 'Velika Gospa', + 'de' => 'Mariä Himmelfahrt', + 'el' => 'Κοίμηση της Θεοτόκου', + 'en' => 'Assumption of Mary', + 'es' => 'Asunción de la Virgen María', + 'fr' => 'Assomption', + 'hr' => 'Velika Gospa', + 'it' => 'Assunzione di Maria Vergine', 'it_CH' => 'Assunzione', - 'it_IT' => 'Assunzione di Maria Vergine', - 'lt_LT' => 'Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)', - 'nl_BE' => 'Onze Lieve Vrouw hemelvaart', - 'nl_NL' => 'Onze Lieve Vrouw hemelvaart', - 'pl_PL' => 'Wniebowzięcie Najświętszej Marii Panny', - 'pt_PT' => 'Assunção de Nossa Senhora', - 'ro_RO' => 'Adormirea Maicii Domnului', - 'sk_SK' => 'Nanebovzatie Panny Márie' + 'lt' => 'Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)', + 'nl' => 'Onze Lieve Vrouw hemelvaart', + 'pl' => 'Wniebowzięcie Najświętszej Marii Panny', + 'pt' => 'Assunção de Nossa Senhora', + 'ro' => 'Adormirea Maicii Domnului', + 'sk' => 'Nanebovzatie Panny Márie' ]; diff --git a/src/Yasumi/data/translations/australiaDay.php b/src/Yasumi/data/translations/australiaDay.php index ef8d7752e..a07d969b1 100644 --- a/src/Yasumi/data/translations/australiaDay.php +++ b/src/Yasumi/data/translations/australiaDay.php @@ -12,6 +12,5 @@ // Translations for Australia Day return [ - 'en_AU' => 'Australia Day', - 'en_US' => 'Australia Day' + 'en' => 'Australia Day', ]; diff --git a/src/Yasumi/data/translations/carnationRevolutionDay.php b/src/Yasumi/data/translations/carnationRevolutionDay.php index c1fa592ee..fced9aef3 100644 --- a/src/Yasumi/data/translations/carnationRevolutionDay.php +++ b/src/Yasumi/data/translations/carnationRevolutionDay.php @@ -12,6 +12,6 @@ // Translations for Freedom Day return [ - 'en_US' => 'Freedom Day', - 'pt_PT' => 'Dia da Liberdade' + 'en' => 'Freedom Day', + 'pt' => 'Dia da Liberdade' ]; diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index 87e496bd9..b9fe61979 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -12,41 +12,34 @@ // Translations for Christmas return [ - 'bs_Latn_BA' => 'Božić', - 'cs_CZ' => '1. svátek vánoční', - 'cy_GB' => 'Nadolig', - 'da_DK' => 'Juledag', + 'bs_Latn' => 'Božić', + 'cs' => '1. svátek vánoční', + 'cy' => 'Nadolig', + 'da' => 'Juledag', + 'de' => '1. Weihnachtsfeiertag', 'de_AT' => 'Christtag', 'de_CH' => 'Weihnachtstag', - 'de_DE' => '1. Weihnachtsfeiertag', - 'el_GR' => 'Χριστούγεννα', - 'en_AU' => 'Christmas Day', - 'en_GB' => 'Christmas Day', - 'en_NZ' => 'Christmas Day', + 'el' => 'Χριστούγεννα', + 'en' => 'Christmas Day', 'en_US' => 'Christmas', - 'en_ZA' => 'Christmas Day', - 'es_ES' => 'Navidad', - 'et_EE' => 'Esimene jõulupüha', - 'fi_FI' => 'Joulupäivä', - 'fr_BE' => 'Noël', - 'fr_CH' => 'Noël', - 'fr_FR' => 'Noël', - 'hr_HR' => 'Božić', - 'hu_HU' => 'Karácsony', - 'it_CH' => 'Natale', - 'it_IT' => 'Natale', - 'ko_KR' => '기독탄신일', - 'lt_LT' => 'Šv. Kalėdos', - 'lv_LV' => 'Ziemassvētki', - 'nb_NO' => 'Første juledag', + 'es' => 'Navidad', + 'et' => 'Esimene jõulupüha', + 'fi' => 'Joulupäivä', + 'fr' => 'Noël', + 'hr' => 'Božić', + 'hu' => 'Karácsony', + 'it' => 'Natale', + 'ko' => '기독탄신일', + 'lt' => 'Šv. Kalėdos', + 'lv' => 'Ziemassvētki', + 'nb' => 'Første juledag', + 'nl' => 'Eerste kerstdag', 'nl_BE' => 'Kerstmis', - 'nl_NL' => 'Eerste kerstdag', - 'pl_PL' => 'pierwszy dzień Bożego Narodzenia', - 'pt_BR' => 'Natal', - 'pt_PT' => 'Natal', - 'ro_RO' => 'Crăciunul', - 'ru_UA' => 'Рождество', - 'sk_SK' => 'Prvý sviatok vianočný', - 'sv_SE' => 'juldagen', - 'uk_UA' => 'Різдво' + 'pl' => 'pierwszy dzień Bożego Narodzenia', + 'pt' => 'Natal', + 'ro' => 'Crăciunul', + 'ru' => 'Рождество', + 'sk' => 'Prvý sviatok vianočný', + 'sv' => 'juldagen', + 'uk' => 'Різдво' ]; diff --git a/src/Yasumi/data/translations/christmasEve.php b/src/Yasumi/data/translations/christmasEve.php index 60bee03a4..9f4e48885 100755 --- a/src/Yasumi/data/translations/christmasEve.php +++ b/src/Yasumi/data/translations/christmasEve.php @@ -12,20 +12,19 @@ // Translations for Christmas Eve return [ - 'cs_CZ' => 'Štědrý den', - 'cy_GB' => 'Noswyl Nadolig', - 'da_DK' => 'Juleaften', - 'de_CH' => 'Heiliger Abend', - 'en_US' => 'Christmas Eve', - 'et_EE' => 'Jõululaupäev', - 'fr_BE' => 'Réveillon de Noël', - 'fr_CH' => 'Réveillon de Noël', - 'it_CH' => 'Vigilia di Natale', - 'ko_KR' => '크리스마스 이브', - 'lt_LT' => 'Šv. Kūčios', - 'lv_LV' => 'Ziemassvētku vakars', - 'pt_PT' => 'Véspera de Natal', - 'ro_RO' => 'Ajunul Crãciunului', - 'sk_SK' => 'Štedrý deň', - 'sv_SE' => 'julafton' + 'cs' => 'Štědrý den', + 'cy' => 'Noswyl Nadolig', + 'da' => 'Juleaften', + 'de' => 'Heiliger Abend', + 'en' => 'Christmas Eve', + 'et' => 'Jõululaupäev', + 'fr' => 'Réveillon de Noël', + 'it' => 'Vigilia di Natale', + 'ko' => '크리스마스 이브', + 'lt' => 'Šv. Kūčios', + 'lv' => 'Ziemassvētku vakars', + 'pt' => 'Véspera de Natal', + 'ro' => 'Ajunul Crãciunului', + 'sk' => 'Štedrý deň', + 'sv' => 'julafton' ]; diff --git a/src/Yasumi/data/translations/corpusChristi.php b/src/Yasumi/data/translations/corpusChristi.php index 81e675986..0a456fc6a 100644 --- a/src/Yasumi/data/translations/corpusChristi.php +++ b/src/Yasumi/data/translations/corpusChristi.php @@ -12,15 +12,12 @@ // Translations for Corpus Christi return [ - 'de_AT' => 'Fronleichnam', - 'de_CH' => 'Fronleichnam', - 'de_DE' => 'Fronleichnam', - 'en_US' => 'Corpus Christi', - 'es_ES' => 'Corpus Christi', - 'fr_CH' => 'Fête-Dieu', - 'hr_HR' => 'Tijelovo', - 'it_CH' => 'Corpus Domini', - 'pl_PL' => 'Boże Ciało', - 'pt_BR' => 'Corpus Christi', + 'de' => 'Fronleichnam', + 'en' => 'Corpus Christi', + 'fr' => 'Fête-Dieu', + 'hr' => 'Tijelovo', + 'it' => 'Corpus Domini', + 'pl' => 'Boże Ciało', + 'pt' => 'Corpus Christi', 'pt_PT' => 'Corpo de Deus' ]; diff --git a/src/Yasumi/data/translations/dayAfterNewYearsDay.php b/src/Yasumi/data/translations/dayAfterNewYearsDay.php index 34c73e2f2..8648e89fc 100644 --- a/src/Yasumi/data/translations/dayAfterNewYearsDay.php +++ b/src/Yasumi/data/translations/dayAfterNewYearsDay.php @@ -12,7 +12,7 @@ // Translations for Day after New Year's Day return [ - 'en_NZ' => 'Day after New Year\'s Day', - 'en_US' => 'Day after New Year\'s Day', - 'ko_KR' => '새해 연휴' + 'en' => 'Day after New Year\'s Day', + 'ko' => '새해 연휴', + 'ro' => 'A doua zi după Anul Nou' ]; diff --git a/src/Yasumi/data/translations/dayOfReformation.php b/src/Yasumi/data/translations/dayOfReformation.php index 80929e843..07621e861 100755 --- a/src/Yasumi/data/translations/dayOfReformation.php +++ b/src/Yasumi/data/translations/dayOfReformation.php @@ -12,6 +12,6 @@ // Translations for Day of Reformation return [ - 'de_DE' => 'Tag der Reformation', - 'en_US' => 'Day of Reformation' + 'de' => 'Tag der Reformation', + 'en' => 'Day of Reformation' ]; diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index f34887bea..39362cb98 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -12,35 +12,28 @@ // Translations for Easter Sunday return [ - 'bs_Latn_BA' => 'Uskrs', - 'cy_GB' => 'Sul y Pasg', - 'da_DK' => 'Påskedag', - 'de_AT' => 'Ostersonntag', + 'bs_Latn' => 'Uskrs', + 'cy' => 'Sul y Pasg', + 'da' => 'Påskedag', + 'de' => 'Ostersonntag', 'de_CH' => 'Ostern', - 'de_DE' => 'Ostersonntag', - 'el_GR' => 'Κυριακή του Πάσχα', - 'en_IE' => 'Easter Sunday', - 'en_US' => 'Easter Sunday', - 'et_EE' => 'Ülestõusmispühade 1. püha', - 'fi_FI' => 'Pääsiäispäivä', - 'fr_BE' => 'Pâques', - 'fr_CH' => 'Pâques', - 'fr_FR' => 'Pâques', - 'ga_IE' => 'Domhnach Cásca', - 'hr_HR' => 'Uskrs', - 'hu_HU' => 'Húsvét', - 'it_CH' => 'Pasqua', - 'it_IT' => 'Pasqua', - 'lt_LT' => 'Velykos', - 'lv_LV' => 'Lieldienas', - 'nb_NO' => 'Første påskedag', - 'nl_BE' => 'Eerste paasdag', - 'nl_NL' => 'Eerste paasdag', - 'pl_PL' => 'Wielkanoc', - 'pt_BR' => 'Páscoa', - 'pt_PT' => 'Páscoa', - 'ro_RO' => 'Paștele', - 'ru_UA' => 'Пасха', - 'sv_SE' => 'påskdagen', - 'uk_UA' => 'Великдень' + 'el' => 'Κυριακή του Πάσχα', + 'en' => 'Easter Sunday', + 'et' => 'Ülestõusmispühade 1. püha', + 'fi' => 'Pääsiäispäivä', + 'fr' => 'Pâques', + 'ga' => 'Domhnach Cásca', + 'hr' => 'Uskrs', + 'hu' => 'Húsvét', + 'it' => 'Pasqua', + 'lt' => 'Velykos', + 'lv' => 'Lieldienas', + 'nb' => 'Første påskedag', + 'nl' => 'Eerste paasdag', + 'pl' => 'Wielkanoc', + 'pt' => 'Páscoa', + 'ro' => 'Paștele', + 'ru' => 'Пасха', + 'sv' => 'påskdagen', + 'uk' => 'Великдень' ]; diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 829bcb8a6..4e5a36559 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -12,35 +12,27 @@ // Translations for Easter Monday return [ - 'cs_CZ' => 'Velikonoční pondělí', - 'cy_GB' => 'Llun y Pasg', - 'da_DK' => '2. påskedag', - 'de_AT' => 'Ostermontag', - 'de_CH' => 'Ostermontag', - 'de_DE' => 'Ostermontag', - 'el_GR' => 'Δευτέρα του Πάσχα', - 'en_AU' => 'Easter Monday', - 'en_GB' => 'Easter Monday', - 'en_IE' => 'Easter Monday', - 'en_NZ' => 'Easter Monday', - 'en_US' => 'Easter Monday', - 'es_ES' => 'Lunes de Pascua', - 'fi_FI' => '2. pääsiäispäivä', - 'fr_BE' => 'Lundi de Pâques', - 'fr_CH' => 'Lundi de Pâques', - 'fr_FR' => 'Lundi de Pâques', - 'ga_IE' => 'Luan Cásca', - 'hr_HR' => 'Uskršnji ponedjeljak', - 'hu_HU' => 'Húsvéthétfő', + 'cs' => 'Velikonoční pondělí', + 'cy' => 'Llun y Pasg', + 'da' => '2. påskedag', + 'de' => 'Ostermontag', + 'el' => 'Δευτέρα του Πάσχα', + 'en' => 'Easter Monday', + 'es' => 'Lunes de Pascua', + 'fi' => '2. pääsiäispäivä', + 'fr' => 'Lundi de Pâques', + 'ga' => 'Luan Cásca', + 'hr' => 'Uskršnji ponedjeljak', + 'hu' => 'Húsvéthétfő', + 'it' => 'Lunedì dell\'Angelo', 'it_CH' => 'Lunedi di Pasqua', - 'it_IT' => 'Lunedì dell\'Angelo', - 'lt_LT' => 'Antroji Velykų diena', - 'lv_LV' => 'Otrās Lieldienas', - 'nb_NO' => 'Andre påskedag', + 'lt' => 'Antroji Velykų diena', + 'lv' => 'Otrās Lieldienas', + 'nb' => 'Andre påskedag', 'nl_BE' => 'Paasmaandag', - 'nl_NL' => 'Tweede paasdag', - 'pl_PL' => 'Poniedziałek Wielkanocny', - 'ro_RO' => 'A doua zi de Paște', - 'sk_SK' => 'Veľkonočný pondelok', - 'sv_SE' => 'annandag påsk' + 'nl' => 'Tweede paasdag', + 'pl' => 'Poniedziałek Wielkanocny', + 'ro' => 'A doua zi de Paște', + 'sk' => 'Veľkonočný pondelok', + 'sv' => 'annandag påsk' ]; diff --git a/src/Yasumi/data/translations/epiphany.php b/src/Yasumi/data/translations/epiphany.php index 995ee3d19..398ab297e 100644 --- a/src/Yasumi/data/translations/epiphany.php +++ b/src/Yasumi/data/translations/epiphany.php @@ -14,20 +14,17 @@ return [ 'de_AT' => 'Heilige Drei Könige', 'de_CH' => 'Heilige Drei Könige', - 'de_DE' => 'Heilige 3 Könige', - 'el_GR' => 'Θεοφάνεια', - 'en_US' => 'Epiphany', - 'es_ES' => 'Día de Reyes', - 'fi_FI' => 'Loppiainen', - 'fr_BE' => 'Epiphanie', - 'fr_CH' => 'Epiphanie', - 'hr_HR' => 'Sveta tri kralja', - 'it_CH' => 'Epifania', - 'it_IT' => 'Epifania', - 'ja_JP' => 'エピファニー', - 'nl_BE' => 'Drie Koningen', - 'nl_NL' => 'Drie Koningen', - 'pl_PL' => 'Święto Trzech Króli', - 'sk_SK' => 'Zjavenie Pána / Traja králi', - 'sv_SE' => 'trettondedag jul' + 'de' => 'Heilige 3 Könige', + 'el' => 'Θεοφάνεια', + 'en' => 'Epiphany', + 'es' => 'Día de Reyes', + 'fi' => 'Loppiainen', + 'fr' => 'Epiphanie', + 'hr' => 'Sveta tri kralja', + 'it' => 'Epifania', + 'ja' => 'エピファニー', + 'nl' => 'Drie Koningen', + 'pl' => 'Święto Trzech Króli', + 'sk' => 'Zjavenie Pána / Traja králi', + 'sv' => 'trettondedag jul' ]; diff --git a/src/Yasumi/data/translations/epiphanyEve.php b/src/Yasumi/data/translations/epiphanyEve.php index c0c8f6c97..dfc44f11d 100644 --- a/src/Yasumi/data/translations/epiphanyEve.php +++ b/src/Yasumi/data/translations/epiphanyEve.php @@ -12,7 +12,7 @@ // Translations for Epiphany Eve return [ - 'da_DK' => 'Helligtrekongersaften', - 'en_US' => 'Epiphany Eve', - 'sv_SE' => 'trettondagsafton' + 'da' => 'Helligtrekongersaften', + 'en' => 'Epiphany Eve', + 'sv' => 'trettondagsafton' ]; diff --git a/src/Yasumi/data/translations/fathersDay.php b/src/Yasumi/data/translations/fathersDay.php index 518f11874..20f0f4615 100755 --- a/src/Yasumi/data/translations/fathersDay.php +++ b/src/Yasumi/data/translations/fathersDay.php @@ -12,15 +12,13 @@ // Translations for Father's Day return [ - 'de_CH' => 'Vatertag', - 'el_GR' => 'Γιορτή του πατέρα', - 'en_US' => 'Father\'s Day', - 'fr_BE' => 'Fête des pères', - 'fr_CH' => 'Fête des pères', - 'it_CH' => 'Festa del papà', - 'nl_BE' => 'Vaderdag', - 'nl_NL' => 'Vaderdag', - 'pt_PT' => 'Dia do Pai', - 'ro_RO' => 'Ziua Tatălui', - 'sk_SK' => 'Deň otcov' + 'de' => 'Vatertag', + 'el' => 'Γιορτή του πατέρα', + 'en' => 'Father\'s Day', + 'fr' => 'Fête des pères', + 'it' => 'Festa del papà', + 'nl' => 'Vaderdag', + 'pt' => 'Dia do Pai', + 'ro' => 'Ziua Tatălui', + 'sk' => 'Deň otcov' ]; diff --git a/src/Yasumi/data/translations/goodFriday.php b/src/Yasumi/data/translations/goodFriday.php index 3910993fc..8384896e5 100644 --- a/src/Yasumi/data/translations/goodFriday.php +++ b/src/Yasumi/data/translations/goodFriday.php @@ -12,35 +12,26 @@ // Translations for Good Friday return [ - 'cs_CZ' => 'Velký pátek', - 'cy_GB' => 'Gwener y Groglith', - 'da_DK' => 'Langfredag', - 'de_CH' => 'Karfreitag', - 'de_DE' => 'Karfreitag', - 'el_GR' => 'Μεγάλη Παρασκευή', - 'en_AU' => 'Good Friday', - 'en_GB' => 'Good Friday', - 'en_IE' => 'Good Friday', - 'en_NZ' => 'Good Friday', - 'en_US' => 'Good Friday', - 'en_ZA' => 'Good Friday', - 'es_ES' => 'Viernes Santo', - 'et_EE' => 'Suur Reede', - 'fi_FI' => 'Pitkäperjantai', - 'fr_BE' => 'Vendredi Saint', - 'fr_CH' => 'Vendredi Saint', - 'fr_FR' => 'Vendredi Saint', - 'ga_IE' => 'Aoine an Chéasta', - 'hu_HU' => 'Nagypéntek', - 'it_CH' => 'Venerdi Santo', - 'ja_JP' => 'グッドフライデー', - 'lv_LV' => 'Lielā Piektdiena', - 'nb_NO' => 'Langfredag', - 'nl_BE' => 'Goede Vrijdag', - 'nl_NL' => 'Goede Vrijdag', - 'pl_PL' => 'Wielki Piątek', - 'pt_BR' => 'Sexta feira santa', + 'cs' => 'Velký pátek', + 'cy' => 'Gwener y Groglith', + 'da' => 'Langfredag', + 'de' => 'Karfreitag', + 'el' => 'Μεγάλη Παρασκευή', + 'en' => 'Good Friday', + 'es' => 'Viernes Santo', + 'et' => 'Suur Reede', + 'fi' => 'Pitkäperjantai', + 'fr' => 'Vendredi Saint', + 'ga' => 'Aoine an Chéasta', + 'hu' => 'Nagypéntek', + 'it' => 'Venerdi Santo', + 'ja' => 'グッドフライデー', + 'lv' => 'Lielā Piektdiena', + 'nb' => 'Langfredag', + 'nl' => 'Goede Vrijdag', + 'pl' => 'Wielki Piątek', + 'pt' => 'Sexta feira santa', 'pt_PT' => 'Sexta-feira Santa', - 'sk_SK' => 'Veľký piatok', - 'sv_SE' => 'långfredagen' + 'sk' => 'Veľký piatok', + 'sv' => 'långfredagen' ]; diff --git a/src/Yasumi/data/translations/immaculateConception.php b/src/Yasumi/data/translations/immaculateConception.php index 75a578eb9..7ad1c9c60 100644 --- a/src/Yasumi/data/translations/immaculateConception.php +++ b/src/Yasumi/data/translations/immaculateConception.php @@ -12,14 +12,11 @@ // Translations for Immaculate Conception return [ - 'de_AT' => 'Mariä Empfängnis', - 'de_CH' => 'Mariä Empfängnis', - 'el_GR' => 'Ευαγγελισμός της Θεοτόκου', - 'en_US' => 'Immaculate Conception', - 'es_ES' => 'Inmaculada Concepción', - 'fr_BE' => 'Immaculée Conception', - 'fr_CH' => 'Immaculée Conception', - 'it_CH' => 'Immacolata Concezione', - 'it_IT' => 'Immacolata Concezione', - 'pt_PT' => 'Dia da Imaculada Conceição' + 'de' => 'Mariä Empfängnis', + 'el' => 'Ευαγγελισμός της Θεοτόκου', + 'en' => 'Immaculate Conception', + 'es' => 'Inmaculada Concepción', + 'fr' => 'Immaculée Conception', + 'it' => 'Immacolata Concezione', + 'pt' => 'Dia da Imaculada Conceição' ]; diff --git a/src/Yasumi/data/translations/internationalWomensDay.php b/src/Yasumi/data/translations/internationalWomensDay.php index 4647d5c6a..34b47c696 100755 --- a/src/Yasumi/data/translations/internationalWomensDay.php +++ b/src/Yasumi/data/translations/internationalWomensDay.php @@ -12,10 +12,9 @@ // Translations for International Women's Day return [ - 'de_DE' => 'Internationaler Frauentag', - 'en_US' => 'International Women\'s Day', - 'ko_KR' => '국제 여성의 날', - 'ru_RU' => 'Международный женский день', - 'ru_UA' => 'Международный женский день', - 'uk_UA' => 'Міжнародний жіночий день' + 'de' => 'Internationaler Frauentag', + 'en' => 'International Women\'s Day', + 'ko' => '국제 여성의 날', + 'ru' => 'Международный женский день', + 'uk' => 'Міжнародний жіночий день' ]; diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index 0e9be61a5..a9f35c31e 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -12,38 +12,34 @@ // Translations for International Workers' Day return [ - 'bs_Latn_BA' => 'Praznik rada', - 'cs_CZ' => 'Svátek práce', - 'da_DK' => 'Første maj', + 'bs_Latn' => 'Praznik rada', + 'cs' => 'Svátek práce', + 'da' => 'Første maj', + 'de' => 'Tag der Arbeit', 'de_AT' => 'Staatsfeiertag', - 'de_CH' => 'Tag der Arbeit', - 'de_DE' => 'Tag der Arbeit', - 'el_GR' => 'Εργατική Πρωτομαγιά', + 'el' => 'Εργατική Πρωτομαγιά', 'en_US' => 'International Workers\' Day', 'en_ZA' => 'Workers\' Day', - 'es_ES' => 'Día del Trabajador', - 'et_EE' => 'Kevadpüha', - 'fi_FI' => 'Vappu', - 'fr_BE' => 'Fête du Travail', - 'fr_CH' => 'Fête du Travail', - 'fr_FR' => 'Fête du Travail', - 'hr_HR' => 'Praznik rada', - 'hu_HU' => 'A munka ünnepe', + 'es' => 'Día del Trabajador', + 'et' => 'Kevadpüha', + 'fi' => 'Vappu', + 'fr' => 'Fête du Travail', + 'hr' => 'Praznik rada', + 'hu' => 'A munka ünnepe', + 'it' => 'Festa del Lavoro', 'it_CH' => 'Festa dei lavoratori', - 'it_IT' => 'Festa del Lavoro', - 'ja_JP' => '労働の日', - 'ko_KR' => '노동절', - 'lt_LT' => 'Tarptautinė darbo diena', - 'lv_LV' => 'Darba svētki', - 'nb_NO' => 'Arbeidernes dag', - 'nl_BE' => 'Dag van de arbeid', - 'nl_NL' => 'Dag van de arbeid', - 'pl_PL' => 'Święto Pracy', - 'pt_BR' => 'Dia internacional do trabalhador', + 'ja' => '労働の日', + 'ko' => '노동절', + 'lt' => 'Tarptautinė darbo diena', + 'lv' => 'Darba svētki', + 'nb' => 'Arbeidernes dag', + 'nl' => 'Dag van de arbeid', + 'pl' => 'Święto Pracy', + 'pt' => 'Dia internacional do trabalhador', 'pt_PT' => 'Dia do Trabalhador', - 'ro_RO' => 'Ziua internațională a muncii', - 'ru_UA' => 'День международной солидарности трудящихся', - 'sk_SK' => 'Sviatok práce', - 'sv_SE' => 'Första maj', - 'uk_UA' => 'День міжнародної солідарності трудящих' + 'ro' => 'Ziua internațională a muncii', + 'ru' => 'День международной солидарности трудящихся', + 'sk' => 'Sviatok práce', + 'sv' => 'Första maj', + 'uk' => 'День міжнародної солідарності трудящих' ]; diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index 595ed006d..3079a9338 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -12,12 +12,9 @@ // Translations for Labour Day return [ - 'en_AU' => 'Labour Day', - 'en_NZ' => 'Labour Day', - 'en_US' => 'Labour Day', - 'ja_JP' => '労働の日', - 'ko_KR' => '노동절', - 'nl_BE' => 'Dag van de arbeid', - 'nl_NL' => 'Dag van de arbeid', - 'sk_SK' => 'Sviatok práce' + 'en' => 'Labour Day', + 'ja' => '労働の日', + 'ko' => '노동절', + 'nl' => 'Dag van de arbeid', + 'sk' => 'Sviatok práce' ]; diff --git a/src/Yasumi/data/translations/maundyThursday.php b/src/Yasumi/data/translations/maundyThursday.php index 2e7467344..44f6f2844 100644 --- a/src/Yasumi/data/translations/maundyThursday.php +++ b/src/Yasumi/data/translations/maundyThursday.php @@ -12,9 +12,9 @@ // Translations for Maundy Thursday return [ - 'da_DK' => 'Skærtorsdag', - 'el_GR' => 'Μεγάλη Πέμπτη', - 'en_US' => 'Maundy Thursday', - 'es_ES' => 'Jueves Santo', - 'nb_NO' => 'Skjærtorsdag' + 'da' => 'Skærtorsdag', + 'el' => 'Μεγάλη Πέμπτη', + 'en' => 'Maundy Thursday', + 'es' => 'Jueves Santo', + 'nb' => 'Skjærtorsdag' ]; diff --git a/src/Yasumi/data/translations/mothersDay.php b/src/Yasumi/data/translations/mothersDay.php index 7195526b6..374460a3a 100755 --- a/src/Yasumi/data/translations/mothersDay.php +++ b/src/Yasumi/data/translations/mothersDay.php @@ -12,15 +12,13 @@ // Translations for Mother's Day return [ - 'de_CH' => 'Muttertag', - 'el_GR' => 'Ημέρα της μητέρας', - 'en_US' => 'Mother\'s Day', - 'fr_BE' => 'Fête des mères', - 'fr_CH' => 'Fête des mères', - 'it_CH' => 'Festa della mamma', - 'nl_BE' => 'Moederdag', - 'nl_NL' => 'Moederdag', - 'pt_PT' => 'Dia da Mãe', - 'ro_RO' => 'Ziua Mamei', - 'sk_SK' => 'Deň matiek' + 'de' => 'Muttertag', + 'el' => 'Ημέρα της μητέρας', + 'en' => 'Mother\'s Day', + 'fr' => 'Fête des mères', + 'it' => 'Festa della mamma', + 'nl' => 'Moederdag', + 'pt' => 'Dia da Mãe', + 'ro' => 'Ziua Mamei', + 'sk' => 'Deň matiek' ]; diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 3b2b0f4ec..1fd9f5d9e 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -12,45 +12,35 @@ // Translations for New Year's Day return [ - 'bs_Latn_BA' => 'Nova godina', - 'cs_CZ' => 'Nový rok', - 'cy_GB' => 'Dydd Calan', - 'da_DK' => 'Nytårsdag', - 'de_AT' => 'Neujahr', - 'de_CH' => 'Neujahr', - 'de_DE' => 'Neujahr', - 'el_GR' => 'Πρωτοχρονιά', - 'en_AU' => 'New Year\'s Day', - 'en_GB' => 'New Year\'s Day', - 'en_IE' => 'New Year\'s Day', - 'en_NZ' => 'New Year\'s Day', - 'en_US' => 'New Year\'s Day', - 'en_ZA' => 'New Year\'s Day', - 'es_ES' => 'Año Nuevo', - 'et_EE' => 'Uusaasta', - 'fi_FI' => 'Uudenvuodenpäivä', + 'bs_Latn' => 'Nova godina', + 'cs' => 'Nový rok', + 'cy' => 'Dydd Calan', + 'da' => 'Nytårsdag', + 'de' => 'Neujahr', + 'el' => 'Πρωτοχρονιά', + 'en' => 'New Year\'s Day', + 'es' => 'Año Nuevo', + 'et' => 'Uusaasta', + 'fi' => 'Uudenvuodenpäivä', 'fr_BE' => 'Nouvel An', 'fr_CH' => 'Nouvel An', - 'fr_FR' => 'Jour de l\'An', - 'ga_IE' => 'Lá Caille', - 'hr_HR' => 'Nova godina', - 'hu_HU' => 'Újév', - 'it_CH' => 'Capodanno', - 'it_IT' => 'Capodanno', - 'ja_JP' => '元日', - 'ko_KR' => '새해', - 'lt_LT' => 'Naujųjų metų diena', - 'lv_LV' => 'Jaunais Gads', - 'nb_NO' => 'Første nyttårsdag', - 'nl_BE' => 'Nieuwjaar', - 'nl_NL' => 'Nieuwjaar', - 'pl_PL' => 'Nowy Rok', - 'pt_BR' => 'Ano novo', + 'fr' => 'Jour de l\'An', + 'ga' => 'Lá Caille', + 'hr' => 'Nova godina', + 'hu' => 'Újév', + 'it' => 'Capodanno', + 'ja' => '元日', + 'ko' => '새해', + 'lt' => 'Naujųjų metų diena', + 'lv' => 'Jaunais Gads', + 'nb' => 'Første nyttårsdag', + 'nl' => 'Nieuwjaar', + 'pl' => 'Nowy Rok', + 'pt' => 'Ano novo', 'pt_PT' => 'Dia de Ano Novo', - 'ro_RO' => 'Anul Nou', - 'ru_RU' => 'Новый год', - 'ru_UA' => 'Новый Год', - 'sk_SK' => 'Nový rok', - 'sv_SE' => 'nyårsdagen', - 'uk_UA' => 'Новий Рік' + 'ro' => 'Anul Nou', + 'ru' => 'Новый год', + 'sk' => 'Nový rok', + 'sv' => 'nyårsdagen', + 'uk' => 'Новий Рік' ]; diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php index 67de43599..ea9f6a9c8 100755 --- a/src/Yasumi/data/translations/newYearsEve.php +++ b/src/Yasumi/data/translations/newYearsEve.php @@ -12,9 +12,9 @@ // Translations for New Year's Eve return [ - 'da_DK' => 'Nytårsaften', - 'en_US' => 'New Year\'s Eve', - 'ko_KR' => '신년전야', - 'lv_LV' => 'Vecgada vakars', - 'sv_SE' => 'nyårsafton' + 'da' => 'Nytårsaften', + 'en' => 'New Year\'s Eve', + 'ko' => '신년전야', + 'lv' => 'Vecgada vakars', + 'sv' => 'nyårsafton' ]; diff --git a/src/Yasumi/data/translations/pentecost.php b/src/Yasumi/data/translations/pentecost.php index 63655e955..b2f28426c 100755 --- a/src/Yasumi/data/translations/pentecost.php +++ b/src/Yasumi/data/translations/pentecost.php @@ -12,27 +12,23 @@ // Translations for Whitsunday return [ - 'da_DK' => 'Pinsedag', + 'da' => 'Pinsedag', + 'de' => 'Pfingstsonntag', 'de_AT' => 'Pfingsten', 'de_CH' => 'Pfingsten', - 'de_DE' => 'Pfingstsonntag', - 'el_GR' => 'Πεντηκοστή', - 'en_IE' => 'Whitsunday', - 'en_US' => 'Whitsunday', - 'et_EE' => 'Nelipühade 1. püha', - 'fi_FI' => 'Helluntaipäivä', - 'fr_BE' => 'Pentecôte', - 'fr_CH' => 'Pentecôte', - 'fr_FR' => 'Pentecôte', - 'ga_IE' => 'Domhnach Cincíse', - 'hu_HU' => 'Pünkösd', - 'it_CH' => 'Pentecoste', - 'nb_NO' => 'Første pinsedag', - 'nl_BE' => 'Eerste pinksterdag', - 'nl_NL' => 'Eerste pinksterdag', - 'pl_PL' => 'Zielone Świątki', - 'ro_RO' => 'Rusaliile', - 'ru_UA' => 'Троица', - 'sv_SE' => 'Pingstdagen', - 'uk_UA' => 'Трійця' + 'el' => 'Πεντηκοστή', + 'en' => 'Whitsunday', + 'et' => 'Nelipühade 1. püha', + 'fi' => 'Helluntaipäivä', + 'fr' => 'Pentecôte', + 'ga' => 'Domhnach Cincíse', + 'hu' => 'Pünkösd', + 'it' => 'Pentecoste', + 'nb' => 'Første pinsedag', + 'nl' => 'Eerste pinksterdag', + 'pl' => 'Zielone Świątki', + 'ro' => 'Rusaliile', + 'ru' => 'Троица', + 'sv' => 'Pingstdagen', + 'uk' => 'Трійця' ]; diff --git a/src/Yasumi/data/translations/pentecostMonday.php b/src/Yasumi/data/translations/pentecostMonday.php index 6025392b3..5e1f965cd 100755 --- a/src/Yasumi/data/translations/pentecostMonday.php +++ b/src/Yasumi/data/translations/pentecostMonday.php @@ -12,21 +12,16 @@ // Translations for Whitmonday return [ - 'da_DK' => '2. pinsedag', - 'de_AT' => 'Pfingstmontag', - 'de_CH' => 'Pfingstmontag', - 'de_DE' => 'Pfingstmontag', - 'el_GR' => 'Αγίου Πνεύματος', - 'en_IE' => 'Whitmonday', - 'en_US' => 'Whitmonday', - 'fr_BE' => 'Lundi de Pentecôte', - 'fr_CH' => 'Lundi de Pentecôte', - 'fr_FR' => 'Lundi de Pentecôte', - 'ga_IE' => 'Luan Cincíse', - 'hu_HU' => 'Pünkösdhétfő', - 'it_CH' => 'Lunedi di Pentecoste', - 'nb_NO' => 'Andre pinsedag', + 'da' => '2. pinsedag', + 'de' => 'Pfingstmontag', + 'el' => 'Αγίου Πνεύματος', + 'en' => 'Whitmonday', + 'fr' => 'Lundi de Pentecôte', + 'ga' => 'Luan Cincíse', + 'hu' => 'Pünkösdhétfő', + 'it' => 'Lunedi di Pentecoste', + 'nb' => 'Andre pinsedag', + 'nl' => 'Tweede pinksterdag', 'nl_BE' => 'Pinkstermaandag', - 'nl_NL' => 'Tweede pinksterdag', - 'ro_RO' => 'A doua zi de Rusalii' + 'ro' => 'A doua zi de Rusalii' ]; diff --git a/src/Yasumi/data/translations/portugalDay.php b/src/Yasumi/data/translations/portugalDay.php index e067f467a..952d07a1a 100644 --- a/src/Yasumi/data/translations/portugalDay.php +++ b/src/Yasumi/data/translations/portugalDay.php @@ -12,6 +12,6 @@ // Translations for Portugal Day return [ - 'en_US' => 'Portugal Day', - 'pt_PT' => 'Dia de Portugal' + 'en' => 'Portugal Day', + 'pt' => 'Dia de Portugal' ]; diff --git a/src/Yasumi/data/translations/portugueseRepublicDay.php b/src/Yasumi/data/translations/portugueseRepublicDay.php index b677528a4..9539dc414 100644 --- a/src/Yasumi/data/translations/portugueseRepublicDay.php +++ b/src/Yasumi/data/translations/portugueseRepublicDay.php @@ -12,6 +12,6 @@ // Translations for Implantation of the Portuguese Republic return [ - 'en_US' => 'Implantation of the Portuguese Republic', - 'pt_PT' => 'Implantação da República Portuguesa' + 'en' => 'Implantation of the Portuguese Republic', + 'pt' => 'Implantação da República Portuguesa' ]; diff --git a/src/Yasumi/data/translations/reformationDay.php b/src/Yasumi/data/translations/reformationDay.php index 61a9c8ab3..4a1812165 100755 --- a/src/Yasumi/data/translations/reformationDay.php +++ b/src/Yasumi/data/translations/reformationDay.php @@ -12,6 +12,6 @@ // Translations for Reformation Day return [ - 'de_DE' => 'Reformationstag', - 'en_US' => 'Reformation Day' + 'de' => 'Reformationstag', + 'en' => 'Reformation Day' ]; diff --git a/src/Yasumi/data/translations/restorationOfIndepence.php b/src/Yasumi/data/translations/restorationOfIndepence.php index acce2d38f..37cf8a240 100644 --- a/src/Yasumi/data/translations/restorationOfIndepence.php +++ b/src/Yasumi/data/translations/restorationOfIndepence.php @@ -12,6 +12,6 @@ // Translations for Restoration of Independence return [ - 'en_US' => 'Restoration of Independence', - 'pt_PT' => 'Restauração da Independência' + 'en' => 'Restoration of Independence', + 'pt' => 'Restauração da Independência' ]; diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index eb0a131e8..7165110dc 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -12,27 +12,24 @@ // Translations for Second Christmas Day return [ - 'cs_CZ' => '2. svátek vánoční', - 'da_DK' => '2. juledag', + 'cs' => '2. svátek vánoční', + 'da' => '2. juledag', + 'de' => '2. Weihnachtsfeiertag', 'de_AT' => 'Stefanitag', - 'de_DE' => '2. Weihnachtsfeiertag', - 'el_GR' => 'Σύναξις Υπεραγίας Θεοτόκου Μαρίας', - 'en_AU' => 'Boxing Day', - 'en_GB' => 'Boxing Day', - 'en_NZ' => 'Boxing Day', + 'el' => 'Σύναξις Υπεραγίας Θεοτόκου Μαρίας', + 'en' => 'Boxing Day', 'en_US' => 'Second Christmas Day', 'en_ZA' => 'Day of Goodwill', - 'et_EE' => 'Teine Jõulupüha', - 'fi_FI' => '2. joulupäivä', - 'hu_HU' => 'Karácsony másnapja', - 'ko_KR' => '성탄절 연휴', - 'lt_LT' => 'Kalėdos (antra diena)', - 'lv_LV' => 'Otrie Ziemassvētki', - 'nb_NO' => 'Andre juledag', - 'nl_BE' => 'Tweede kerstdag', - 'nl_NL' => 'Tweede kerstdag', - 'pl_PL' => 'drugi dzień Bożego Narodzenia', - 'ro_RO' => 'A doua zi de Crăciun', - 'sk_SK' => 'Druhý sviatok vianočný', - 'sv_SE' => 'annandag jul' + 'et' => 'Teine Jõulupüha', + 'fi' => '2. joulupäivä', + 'hu' => 'Karácsony másnapja', + 'ko' => '성탄절 연휴', + 'lt' => 'Kalėdos (antra diena)', + 'lv' => 'Otrie Ziemassvētki', + 'nb' => 'Andre juledag', + 'nl' => 'Tweede kerstdag', + 'pl' => 'drugi dzień Bożego Narodzenia', + 'ro' => 'A doua zi de Crăciun', + 'sk' => 'Druhý sviatok vianočný', + 'sv' => 'annandag jul' ]; diff --git a/src/Yasumi/data/translations/stDavidsDay.php b/src/Yasumi/data/translations/stDavidsDay.php index 2aa7ce611..5a603b18c 100644 --- a/src/Yasumi/data/translations/stDavidsDay.php +++ b/src/Yasumi/data/translations/stDavidsDay.php @@ -12,7 +12,6 @@ // Translations for St. David's Day return [ - 'cy_GB' => 'Dydd Gŵyl Dewi', - 'en_GB' => 'St. David\'s Day', - 'en_US' => 'St. David\'s Day' + 'cy' => 'Dydd Gŵyl Dewi', + 'en' => 'St. David\'s Day' ]; diff --git a/src/Yasumi/data/translations/stGeorgesDay.php b/src/Yasumi/data/translations/stGeorgesDay.php index 1f85f1d23..ecca83052 100644 --- a/src/Yasumi/data/translations/stGeorgesDay.php +++ b/src/Yasumi/data/translations/stGeorgesDay.php @@ -12,7 +12,7 @@ // Translations for St. George's Day return [ - 'el_GR' => 'Αγίου Γεωργίου', - 'en_US' => 'St. George\'s Day', - 'es_ES' => 'San Jorge' + 'el' => 'Αγίου Γεωργίου', + 'en' => 'St. George\'s Day', + 'es' => 'San Jorge' ]; diff --git a/src/Yasumi/data/translations/stJohnsDay.php b/src/Yasumi/data/translations/stJohnsDay.php index 81db9cf18..98a08bed1 100644 --- a/src/Yasumi/data/translations/stJohnsDay.php +++ b/src/Yasumi/data/translations/stJohnsDay.php @@ -12,13 +12,13 @@ // Translations for St. John's Day return [ - 'da_DK' => 'Sankthansaften', - 'el_GR' => 'Σύναξις Προφήτου Προδρόμου και Βαπτιστού Ιωάννου', - 'en_US' => 'St. John\'s Day', - 'es_ES' => 'Sant Joan', - 'et_EE' => 'Jaanipäev', - 'fi_FI' => 'Juhannuspäivä', - 'lt_LT' => 'Rasos ir Joninių diena', - 'lv_LV' => 'Jāņi', - 'sv_SE' => 'midsommardagen' + 'da' => 'Sankthansaften', + 'el' => 'Σύναξις Προφήτου Προδρόμου και Βαπτιστού Ιωάννου', + 'en' => 'St. John\'s Day', + 'es' => 'Sant Joan', + 'et' => 'Jaanipäev', + 'fi' => 'Juhannuspäivä', + 'lt' => 'Rasos ir Joninių diena', + 'lv' => 'Jāņi', + 'sv' => 'midsommardagen' ]; diff --git a/src/Yasumi/data/translations/stJohnsEve.php b/src/Yasumi/data/translations/stJohnsEve.php index 8f12086eb..8111bc79a 100644 --- a/src/Yasumi/data/translations/stJohnsEve.php +++ b/src/Yasumi/data/translations/stJohnsEve.php @@ -12,7 +12,7 @@ // Translations for St. John's Eve return [ - 'da_DK' => 'Sankthansaften', - 'en_US' => 'St. John\'s Eve', - 'sv_SE' => 'midsommarafton' + 'da' => 'Sankthansaften', + 'en' => 'St. John\'s Eve', + 'sv' => 'midsommarafton' ]; diff --git a/src/Yasumi/data/translations/stJosephsDay.php b/src/Yasumi/data/translations/stJosephsDay.php index d88fa199e..652fcae9f 100644 --- a/src/Yasumi/data/translations/stJosephsDay.php +++ b/src/Yasumi/data/translations/stJosephsDay.php @@ -12,9 +12,9 @@ // Translations for St. Joseph's Day return [ - 'de_CH' => 'Josephstag', - 'en_US' => 'St. Joseph\'s Day', - 'es_ES' => 'San José', - 'fr_CH' => 'Saint-Joseph', - 'it_CH' => 'San Giuseppe' + 'de' => 'Josephstag', + 'en' => 'St. Joseph\'s Day', + 'es' => 'San José', + 'fr' => 'Saint-Joseph', + 'it' => 'San Giuseppe' ]; diff --git a/src/Yasumi/data/translations/stMartinsDay.php b/src/Yasumi/data/translations/stMartinsDay.php index 53c9ddfda..384ae2b20 100644 --- a/src/Yasumi/data/translations/stMartinsDay.php +++ b/src/Yasumi/data/translations/stMartinsDay.php @@ -12,7 +12,6 @@ // Translations for St. Martin's Day return [ - 'en_US' => 'St. Martin\'s Day', - 'nl_BE' => 'Sint Maarten', - 'nl_NL' => 'Sint Maarten' + 'en' => 'St. Martin\'s Day', + 'nl' => 'Sint Maarten', ]; diff --git a/src/Yasumi/data/translations/stStephensDay.php b/src/Yasumi/data/translations/stStephensDay.php index 7283b8903..e04553796 100644 --- a/src/Yasumi/data/translations/stStephensDay.php +++ b/src/Yasumi/data/translations/stStephensDay.php @@ -12,15 +12,12 @@ // Translations for St. Stephen's Day return [ - 'cy_GB' => 'Gŵyl San Steffan', - 'de_CH' => 'Stephanstag', - 'en_IE' => 'St. Stephen\'s Day', - 'en_US' => 'St. Stephen\'s Day', - 'es_ES' => 'Sant Esteve', - 'fr_CH' => 'Saint-Etienne', - 'fr_FR' => 'Saint-Étienne', - 'ga_IE' => 'Lá Fhéile Stiofáin', - 'hr_HR' => 'Sveti Stjepan', - 'it_CH' => 'Santo Stefano', - 'it_IT' => 'Santo Stefano' + 'cy' => 'Gŵyl San Steffan', + 'de' => 'Stephanstag', + 'en' => 'St. Stephen\'s Day', + 'es' => 'Sant Esteve', + 'fr' => 'Saint-Étienne', + 'ga' => 'Lá Fhéile Stiofáin', + 'hr' => 'Sveti Stjepan', + 'it' => 'Santo Stefano' ]; diff --git a/src/Yasumi/data/translations/substituteHoliday.php b/src/Yasumi/data/translations/substituteHoliday.php index 8f723afec..6e4e5fce7 100755 --- a/src/Yasumi/data/translations/substituteHoliday.php +++ b/src/Yasumi/data/translations/substituteHoliday.php @@ -12,11 +12,11 @@ // Translation pattern for substitute holidays. return [ - 'da_DK' => '{0} (erstatning)', - 'en_GB' => '{0} (substitute day)', + 'da' => '{0} (erstatning)', + 'en' => '{0} (substitute day)', 'en_IE' => '{0} observed', 'en_US' => '{0} observed', - 'en_ZA' => '{0} observed', - 'ja_JP' => '振替休日 ({0})', - 'ko_KR' => '대체공휴일', + 'en_CA' => '{0} observed', + 'ja' => '振替休日 ({0})', + 'ko' => '대체공휴일', ]; diff --git a/src/Yasumi/data/translations/summerTime.php b/src/Yasumi/data/translations/summerTime.php index 5eee75079..5d42dd4cc 100644 --- a/src/Yasumi/data/translations/summerTime.php +++ b/src/Yasumi/data/translations/summerTime.php @@ -12,8 +12,8 @@ // Translations for Summertime return [ - 'da_DK' => 'Sommertid starter', - 'en_US' => 'Summertime', - 'ko_KR' => '서머타임', - 'nl_NL' => 'Zomertijd' + 'da' => 'Sommertid starter', + 'en' => 'Summertime', + 'ko' => '서머타임', + 'nl' => 'Zomertijd' ]; diff --git a/src/Yasumi/data/translations/valentinesDay.php b/src/Yasumi/data/translations/valentinesDay.php index 2d3d0d9db..3beaa573a 100644 --- a/src/Yasumi/data/translations/valentinesDay.php +++ b/src/Yasumi/data/translations/valentinesDay.php @@ -12,17 +12,15 @@ // Translations for Valentine's Day return [ - 'de_CH' => 'Valentinstag', - 'el_GR' => 'Αγίου Βαλεντίνου', - 'en_US' => 'Valentine\'s Day', - 'es_ES' => 'San Valentín', - 'fr_BE' => 'Saint-Valentin', - 'fr_CH' => 'Saint-Valentin', - 'it_CH' => 'San Valentino', - 'ja_JP' => 'バレンタイン·デー', - 'ko_KR' => '발렌타인 데이', - 'nl_BE' => 'Valentijnsdag', - 'nl_NL' => 'Valentijnsdag', - 'pl_PL' => 'Walentynki', - 'pt_PT' => 'Dia dos Namorados' + 'de' => 'Valentinstag', + 'el' => 'Αγίου Βαλεντίνου', + 'en' => 'Valentine\'s Day', + 'es' => 'San Valentín', + 'fr' => 'Saint-Valentin', + 'it' => 'San Valentino', + 'ja' => 'バレンタイン·デー', + 'ko' => '발렌타인 데이', + 'nl' => 'Valentijnsdag', + 'pl' => 'Walentynki', + 'pt' => 'Dia dos Namorados' ]; diff --git a/src/Yasumi/data/translations/victoryInEuropeDay.php b/src/Yasumi/data/translations/victoryInEuropeDay.php index 12c3de82c..33a04fbd5 100644 --- a/src/Yasumi/data/translations/victoryInEuropeDay.php +++ b/src/Yasumi/data/translations/victoryInEuropeDay.php @@ -12,8 +12,8 @@ // Translations for Victory in Europe Day return [ - 'cs_CZ' => 'Den vítězství', - 'en_US' => 'Victory in Europe Day', - 'fr_FR' => 'Victoire 1945', - 'sk_SK' => 'Deň víťazstva nad fašizmom' + 'cs' => 'Den vítězství', + 'en' => 'Victory in Europe Day', + 'fr' => 'Victoire 1945', + 'sk' => 'Deň víťazstva nad fašizmom' ]; diff --git a/src/Yasumi/data/translations/waitangiDay.php b/src/Yasumi/data/translations/waitangiDay.php index b891e971e..76ab28edb 100644 --- a/src/Yasumi/data/translations/waitangiDay.php +++ b/src/Yasumi/data/translations/waitangiDay.php @@ -12,6 +12,5 @@ // Translations for Waitangi Day return [ - 'en_NZ' => 'Waitangi Day', - 'en_US' => 'Waitangi Day' + 'en' => 'Waitangi Day' ]; diff --git a/src/Yasumi/data/translations/walpurgisEve.php b/src/Yasumi/data/translations/walpurgisEve.php index 8c83ec8d8..2e2f1448f 100755 --- a/src/Yasumi/data/translations/walpurgisEve.php +++ b/src/Yasumi/data/translations/walpurgisEve.php @@ -12,6 +12,6 @@ // Translations for Walpurgis Night return [ - 'en_US' => 'Walpurgis Night', - 'sv_SE' => 'valborgsmässoafton' + 'en' => 'Walpurgis Night', + 'sv' => 'valborgsmässoafton' ]; diff --git a/src/Yasumi/data/translations/winterTime.php b/src/Yasumi/data/translations/winterTime.php index 3c2777683..f173fccdc 100644 --- a/src/Yasumi/data/translations/winterTime.php +++ b/src/Yasumi/data/translations/winterTime.php @@ -12,7 +12,7 @@ // Translations for Wintertime return [ - 'da_DK' => 'Sommertid slutter', - 'en_US' => 'Wintertime', - 'nl_NL' => 'Wintertijd' + 'da' => 'Sommertid slutter', + 'en' => 'Wintertime', + 'nl' => 'Wintertijd' ]; diff --git a/src/Yasumi/data/translations/worldAnimalDay.php b/src/Yasumi/data/translations/worldAnimalDay.php index 51f49498d..79b615731 100644 --- a/src/Yasumi/data/translations/worldAnimalDay.php +++ b/src/Yasumi/data/translations/worldAnimalDay.php @@ -12,7 +12,6 @@ // Translations for World Animal Day return [ - 'en_US' => 'World Animal Day', - 'nl_BE' => 'Werelddierendag', - 'nl_NL' => 'Werelddierendag' + 'en' => 'World Animal Day', + 'nl' => 'Werelddierendag' ]; diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index f65159114..986bd9651 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -626,4 +626,14 @@ public function testAddExistingHoliday(): void $this->assertEquals($newHolidays, $provider->getHolidayNames()); $this->assertNotEquals($originalHolidays, $provider->getHolidayNames()); } + + /** + * Tests that default locale can be set and retrieved. + */ + public function testGetParentLocales(): void + { + $this->assertEquals([], Yasumi::getParentLocales('az')); + $this->assertEquals(['az'], Yasumi::getParentLocales('az_Cyrl')); + $this->assertEquals(['az_Cyrl', 'az'], Yasumi::getParentLocales('az_Cyrl_AZ')); + } } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 4c4f6f18c..d7c7b155c 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -164,10 +164,21 @@ public function assertTranslatedHolidayName($provider, $shortName, $year, $trans if (\is_array($translations) && !empty($translations)) { foreach ($translations as $locale => $name) { - $translationExists = isset($holiday->translations[$locale]) ? true : false; + $locales = \array_merge( + [$locale], + Yasumi::getParentLocales($locale) + ); + + $translation = null; + foreach ($locales as $l) { + if (isset($holiday->translations[$l])) { + $translation = $holiday->translations[$l]; + break; + } + } - $this->assertTrue($translationExists); - $this->assertEquals($name, $holiday->translations[$locale]); + $this->assertTrue(isset($translation)); + $this->assertEquals($name, $translation); } }