All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- New filter to select holidays that happen on a given date #119 (cruxicheiros)
- Holiday Providers for all Australian states and territories. #112 (Milamber33)
- Holiday Provider for Bosnia. #94 (TheAdnan)
- Added Reformation Day as offical holiday since 2018 in Lower Saxony (Germany). #115 (Taxcamp)
- Added Reformation Day as offical holiday since 2018 in Schleswig-Holstein (Germany). #106 (HenningCash)
- Added Reformation Day as offical holiday since 2018 in Hamburg (Germany). #108 (HenningCash)
- Added Reformation Day as offical holiday since 2018 in Bremen (Germany). #116 (TalonTR)
- The (observed) holidays Lukkeloven, Constitution Day, New Year's Eve and Labour Day, as well as summertime and wintertime are included for Denmark #104 (c960657)
- Upgraded entirely to PHP version 7 with PHP 7.1 being the minimum required version. Base code and all unit tests have been reworked to compatibility with PHP 7.
- Upgraded to PHPUnit to version 7.5.
- Changed Japanese holiday for the 2020 Olympic Games. Marine Day, Mountain Day and Health And Sports Day. #113 (cookie-maker)
- Summer/winter time is now fetched from PHP's tz database. #103 (c960657)
- Changed translation for Norway's national day. #98 (c960657)
- Applied proper null checks in the summertime and wintertime calculations for Denmark and The Netherlands.
- Corrected some namespaces for Australia and Germany.
- Updated copyright year.
- Upgraded various dependency packages.
- Internal locale list updated based on CLDR v34.
- Refactored the Japan and USA Holiday Provider by moving the holiday calculations to private methods. This reduced the complexity of the initialize method.
- Translation for Russia showed in English (except New Year's Day) as the proper locale was not in place.
- Fixed issue for summertime in Denmark in 1980. By default summertime in Denmark is set for the last day of March since 1980, however in 1980 itself, it started on April, 6th.
- Fixed spelling issue in the Swedish translation. #97 (c960657)
- Fixed spelling issues in the Danish translation. #96 (c960657)
- Fixed German Easter Sunday and Pentecost Sunday holidays (not nationwide, only in Brandenburg). #100 (TalonTR)
- Fixed BetweenFilter to ignore time part and timezone. #101 (c960657)
- Fixed bug in provider list generation related to variable order of files returned by the filesystem #107 (leafnode)
- Added a function that can remove a holiday from the holidays providers (i.e. country/state) list of holidays. This function can be helpful in cases where an existing holiday provider class can be extended but some holidays are not part of the original (extended) provider.
- Changed various functions that have a date parameter to support now objects implementing the DateTimeInterface and objects of the DateTimeImmutable type.
- Added support for countries where the weekend definition (start and end day) differs from the global definition (Saturday and Sunday).
- Holiday Provider for Russia. #72 (lukosius)
- Holiday Provider for Estonia. #71 (lukosius)
- Added Scrutinizer integration.
- Locale List updated based on CLDR version 32.
- Added PHPStan static analysis tool to Travis CI #88 (lukosius)
- Various inline documentation enhancements. #87 (lukosius)
- Removed unnecessary typecasts and if-construct. #87 (lukosius)
- Updated inline documentation to include correction Exception throws.
- Removed unnecessary NULL checks.
- Fixed Brazilian Carnaval Day and added Ash Wednesday to Brazilian Holidays. #92 (glauberm)
- Yasumi listed 01.04.2018 (Easter Sunday) for Spain as an official holiday, however it is not recognized as such. Fix made that recognizes Easter Sunday as being observed (in all regions). #86 (Bastian Konetzny)
- Corrected reference to the Holiday Provider's ID to be static.
- Changed weekend data property into constant as it is not dynamic (runtime).
- Corrected the name translation test for the Restoration of Independence Day (Portugal). The test didn't account for the fact that this holiday was abolished and reinstated at some time.
- Corrected unit test for Geneva (Switzerland) as the jeune Genevois day was incorrectly asserted as a regional holiday.
- Corrected the count logic so that in case a holiday is substituted (or observed), it is only counted once.
- Dropped unnecessary arguments of some methods in various Holiday Providers.
- Corrected Japanese "Green Day" and "Children's Day" to use "Hiragana" instead of Kanji. #80 (cookie-maker)
- All filters implement the Countable interface allowing you to use the ->count() method. #77
- Holiday Provider for Latvia. #70 (lukosius)
- Holiday Provider for Lithuania. #67 (lukosius)
- Sometimes it is more convenient to be able to create a Yasumi instance by ISO3166 code rather than Yasumi's Holiday Provider name. A new function
createByISO3166_2
has been added to allow for that. #62 (huehnerhose) - Missing translations (de_DE) for Easter Sunday and Whitsunday. #60 (IceShack)
- Holiday Provider for Hungary. #57 (AronNovak)
- Holiday Provider for Switzerland. #56 (qligier)
- Made
calculate
method public and use of proper camel casing. #73 (patrickreck) - Upgraded Faker Library to version 1.7
- Renamed the holiday type NATIONAL to OFFICIAL. Subregions may have official holidays and the name NATIONAL doesn't suit these situations. #65
- Upgraded PHP-CS-Fixer to version 2.6
- Corrected Geneva (Switzerland) unit test to ensure some holidays that are established at a particular year are handled as such.
- Repentance Day is an official holiday in Saxony (Germany) #63
- Corrected the Easter Sunday translation for Austria (de_AT) #66
- Corrected Hungary unit test to ensure holidays that are established at a particular year are handled as such.
- Added missing Summer Bank Holiday for the United Kingdom. #64
- Added missing unit tests for Reformation Day as in 2017 it is celebrated in all German states for its 500th anniversary.
- Added missing unit tests for the German Unit Day for each German state.
- Created fallback calculation of the easter_days function in case the PHP extension 'calendar' is not loaded. #55 (stelgenhof)
- Moved Reformation Day to Christian Holidays as it is not only celebrated in Germany.
- Changed Travis configuration to use Composer-installed phpunit to avoid if any issues arise with globally installed phpunit.
- Fixed Christmas Day and Boxing Day for the United Kingdom. A substitute bank holiday is now created for both Christmas and Boxing Day when either of those days fall on a weekend. #48 (joshuabaker)
- Renamed 'en_US' translation for the Second Christmas Day (from ‘Boxing Day’ to ‘Second Christmas Day’: Boxing Day concept does not exist in the US). #53 (AngelinCalu)
- Added Holiday Provider for Romania. #52 (AngelinCalu)
- Added Holiday Provider for Ireland. stelgenhof
- Added Holiday Provider for South Africa. stelgenhof
- Added Holiday Provider for Austria. stelgenhof
- Added 'en_US' translations for the Polish Independence Day and Constitution Day. #45 (AngelinCalu)
- Refactored the calculation of Orthodox Easter using the function from ChristianHolidays.php. #47 (AngelinCalu)
- The parameters of the
isHoliday
andisWorkingDay
methods now allow for classes that derive from DateTime (like the very popular Carbon class). #49 (stelgenhof)
- Added Holiday Provider for Australia (and the sub-region of Victoria). #38 (brucealdridge)
- You can now also use your own holiday providers in addition to the included holiday providers. A very helpful improvement if Yasumi does not include your provider (yet), but you want to use yours! #29 (navarr)
- Added Holiday Provider for Portugal. #44 (rvelhote)
- Added Holiday Provider for Ukraine. #41 (madmis)
- Possibility to retrieve the next or previous working day within a defined number of days from today #39 (brucealdridge)
- Added Holiday Providers for all 16 German States. #34 (stelgenhof)
- Added Holiday Provider for Croatia. #32 (karlomikus)
- Carnival Day in Brazil was incorrectly set to be 47 days after Easter. Carnival Day begins Friday before Ash Wednesday (51 days to Easter). #36 (icaroce)
- All Saints Day for Finland was incorrectly set for November 1st. The correct date is Saturday between 31 Oct and 6 Nov, similar to Sweden. #43 (stelgenhof)
- Added Holiday Provider for Brazil. #21 (dorianneto)
- Added Holiday Provider for the Czech Republic. #26 (dfridrich)
- Added Holiday Provider for the United Kingdom. #23 (stelgenhof)
- Add Welsh language (spoken in Wales, UK) translations for the holidays in the United Kingdom #25 (meigwilym)
- To determine a set of holidays between two dates you can now use the aptly named 'between()' method.
- All Holiday Provider must now implement a code that will identify it. Typically this is the ISO3166 code corresponding to the respective country or sub-region. This can help for purposes such as translations or interfacing with other API's for example.
- Fixed an issue with the unit test for the 'getProviders' method failing on Windows. Hardcoded unix-style directory separators have been replaced by DIRECTORY_SEPARATOR. #30 (navarr)
- Corrected a typo in the English translation for 敬老の日 (Japan) #22 (navarr)
- Fixed issue that the unit tests in 'YasumiTest' (methods 'next' and 'previous') did not cover the situations that the limits are exceeded. #28
- Added Holiday Provider for Poland. #18 (mpdx)
- Added Holiday Provider for New Zealand. #13 (badams)
- Added Holiday Provider for Greece. #10 (sebdesign)
- Added Holiday Provider for Germany. #9 (eaglefsd)
- Added translations ('fr_FR', 'fr_BE') for Belgium National day #864d250 (R2c)
- Added missing English ('en_US') translations for the Christian holidays 'Immaculate Conception', 'Maundy Thursday', 'St. Georges Day', 'St. John's Day', 'St. Josephs Day' and 'St. Stephens Day'.
- Added Test Interface class to ensure the unit tests contain a some minimal assertions.
- Sorted all translations in the translation files alphabetically (descending).
- Refactoring and cleanup of all unit tests.
- Fixed issue for Sweden as All Saints Day was always calculated to be on November 1st. However the holiday has always been celebrated on a Saturday (between October 31 and November 6th).
- Fixed the getProviders as it was not able to load Holiday Providers defined in (sub) regions #5879133 (R2c)
- Fixed issue that it was possible for the AbstractProvider class to be loaded as a Holiday Provider #9678bc4 (R2c)
- Corrected incorrect pathname reference *BaseTestCase.php files ("Test" -> "test).
- Fixed issue for France as Good Friday and St. Stephens Day were defined as official holidays. These aren't national holidays and are only observed in the French departments Moselle, Bas-Rhin and Haut-Rhin. With this fix, these holidays have been removed from the France Holiday providers and new providers for the departments Moselle, Bas-Rhin and Haut-Rhin are added. #17 (R2c)
- Updated locales list based on CLDR version 29. Removed locales of which the region identifier is not specified.
- Fixed issue for Sweden as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However the holiday has always been celebrated on a Saturday (between June 20 and June 26).
- Fixed base test for some Spain/LaRioja as some holidays have been established only in a particular year, causing false failures in the unit tests.
- Running php-cs-fixer fix . --level=psr2 generated a massive list of changes, and broke unit tests. Added a custom .php_cs config file to adhere to the PSR-2 Coding Standards and resolve this issue. In addition the php-cs-fixer command to has been added to composer to run the fixers and on the CI server (Travis), meaning PR’s will need to be PSR2 compliant before they can be merged. If any files do not pass, the build fails. #15 #16 (badams)
- Accidentally the timezone for Norway was set to "Europe/Copenhagen". This has been corrected to "Europe/Oslo". #11 #12 (badams)
- Fixed issue for Finland as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However since 1955, the holiday has always been celebrated on a Saturday (between June 20 and June 26).
- Added Holiday Provider for Denmark
- Added Holiday Provider for Norway
- Added Holiday Provider for Sweden
- Added Holiday Provider for Finland
- New function 'isWorkingDay' added that determines whether a date represents a working day or not. A working day is considered a date that is neither a holiday nor falls into the weekend.
- Refactoring and cleanup of unit tests
- The Vernal Equinox Day and Autumnal Equinox Day in Japan were excluded from having it substituted for another day in case these days would fall on the weekend.
- Fixed tests for some holiday providers as some holidays have been established only in a particular year, causing false failures in the unit tests.
- Added Spain Holiday Provider (including the autonomous communities Andalusia, Aragon, Asturias, Balearic Islands, Basque Country, Canary Islands, Cantabria, Castile and León, Castilla-La Mancha, Ceuta, Community of Madrid, Extremadura, Galicia, La Rioja, Melilla, Navarre, Region of Murcia, Valencian Community)
- Added Corpus Christi, St. Joseph's Day, Maundy Thursday, St. George's Day, St. John's Day to the common Christian Holidays.
- Created separate tests for holidays that are substituted on different days.
- Allow for name spaced holiday providers.
- Added test for translation of Ash Wednesday and Valentinesday in the Netherlands.
- Added test to check whether all holidays for a Holiday Provider are defined by the respective provider class.
- Updated some English, Italian, French and Dutch translations.
- Moved all other holiday calculations in Netherlands and France to individual methods.
- For Japan substituted holidays had same date as the original holidays.
- Removed support for PHP 5.4. Minimum version is now 5.5. PHP 7.0 is known to work however in Travis CI still allowed to fail
- Initial Release