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.
xo
as a dependency 😑.
1.5.0 - 2017-08-03
- Argentina, Denmark, and India locales.
modifyHolidays.load
function.- gulp build tasks.
- Table of Contents to readme.
- Fixed bug where getting the weekday on or before/after a certain date would fail if the next specific weekday is 6 days away.
- Holiday names are now checked the same as keywords (using only words that are 3 characters or more).
- A date string can now be passed back to the parser from a parser extension.
- The holiday keyword finder will now return multiple holidays in the case of a keyword points tie rather than just false.
holiday
function will now return false is the current holiday set is empty and the holiday parameter is set to null.- Made
test.js
more dynamic for all locales. us
locale is nowUnited States
and is no longer built-in tomoment-holiday.js
by default (You can still get the one withUnited States
built-in by usingbuild/moment-holiday-us.js
).- When loading locale files, spaces are now converted to underscores.
1.4.2 - 2017-07-26
- Added Croatia locale (Thanks @diomed!).
- Some more keywords to bower and NPM.
- Updated some keywords for locales to make them easier to find.
- Internal function
findHoliday
will now skip keyword search if the string matches the holiday name exactly (case-insensitive). - Fixed a bug where
npm test
would fail on holidays with matching keywords.
1.4.1 - 2017-07-24
- Changed internal function
merge
dynamic parameters to static ones for older node version support. - Internal function
findHoliday
will now skip keyword search if the string matches the holiday name exactly.
1.4.0 - 2017-07-24
- Ash Wednesday, Lent, Holy Saturday, Easter Monday, Ascension Day, Pentecost Sunday, Whit Monday, and Corpus Christi to Easter locale.
- Valentine's Day, Islander Day, Louis Riel Day, Saint Patrick's Day, Good Friday, Easter Sunday, Aboriginal Day, St. Jean Baptiste Day, Canada Day, Halloween, Remembrance Day, and Thanksgiving Day to Canada locale.
- Finland and Germany locales.
- Specifics parameter to
modifyHolidays.set
andmodifyHolidays.add
functions for cherry-picking specific holidays to use from a locale. - Support for locale regions.
modifyHolidays.undo
function.- Easter Sunday and Good Friday to actual US locale so that they get added back when using
modifyHolidays.set('US')
.
- Fixed bug where using the
modifyHolidays.set
function would modify the original locale object. - Default parser will now skip a date if it doesn't start with a number or
(
character. isHoliday
function will now return an array of holiday names if not checking for a specific holiday in the case of multiple holidays on the same day.- Parser will continue to run through all parser extensions even after one has returned false. If the date is still false after all extensions, the parser will return false.
test.js
now handles dynamic holiday counts and indexes.- Changed some keywords into regex keywords for better accuracy.
- Changed active holiday object from
holidayObject
tomoment.holidays.active
to make it public. - Cleaned up some code.
1.3.1 - 2017-07-19
- Fixed bug with Labor Day keywords.
1.3.0 - 2017-07-19
- Support for holidays that span multiple days.
- Support for "The [Weekday] on or before/after [Day]".
- Support for year specific holidays.
- Locale functionality.
- Easter and Canadian locales.
- Documentation on
modifyHolidays.extendParser
function.
moment().modifyHolidays
tomoment.modifyHolidays
.- Made
moment.modifyHolidays
functions chainable.
1.2.0 - 2017-07-17
modifyHolidays.extendParser
function.
1.1.1 - 2017-07-17
previousHoliday
andnextHoliday
functions will return a single moment object ifcount
is set to1
.
1.1.0 - 2017-07-17
previousHoliday
andnextHoliday
functions.holidays
alias function forholiday
.
- Moved holidays object from
moment.fn.holidays
tomoment.holidays
. - Fixed bug where
holidaysBetween
function would only return holidays for the start year. holidaysBetween
function now returns an array of moment objects rather than an object.isHoliday
now accepts aholidays
parameter to get atrue
response.
- Initial release.