moment-holiday
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -9,2 +9,13 @@ # Changelog | ||
## [1.4.2] - 2017-07-26 | ||
### Added | ||
- [Added Croatia locale](https://github.com/kodie/moment-holiday/pull/1) (Thanks [@diomed](https://github.com/diomed)!). | ||
- Some more keywords to bower and NPM. | ||
### Changed | ||
- 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 | ||
@@ -83,2 +94,3 @@ ### Changed | ||
[Unreleased]: https://github.com/kodie/moment-holiday/compare/v1.0.0...HEAD | ||
[1.4.2]: https://github.com/kodie/moment-holiday/compare/v1.4.1...v1.4.2 | ||
[1.4.1]: https://github.com/kodie/moment-holiday/compare/v1.4.0...v1.4.1 | ||
@@ -85,0 +97,0 @@ [1.4.0]: https://github.com/kodie/moment-holiday/compare/v1.3.1...v1.4.0 |
@@ -11,3 +11,3 @@ //! moment-holiday.js locale configuration | ||
date: '1/1', | ||
keywords: ['uudenvuodenpäivä', 'uudenvuodenpaiva'] | ||
keywords: ['uudenvuodenpäivä', 'uudenvuodenpaiva', 'new', 'year'] | ||
}, | ||
@@ -32,3 +32,3 @@ "Loppiainen": { | ||
date: '12/25', | ||
keywords: ['joulupäivä', 'joulupaiva'] | ||
keywords: ['joulupäivä', 'joulupaiva', 'christmas'] | ||
}, | ||
@@ -41,12 +41,12 @@ "Tapaninpäivä": { | ||
date: 'goodfriday', | ||
keywords: ['pitkäperjantai', 'pitkaperjantai'] | ||
keywords: ['pitkäperjantai', 'pitkaperjantai', 'good', 'friday'] | ||
}, | ||
"Pääsiäispäivä": { | ||
date: 'easter', | ||
keywords: ['pääsiäispäivä', 'paasiaispaiva'], | ||
keywords_n: ['toinen'] | ||
keywords: ['pääsiäispäivä', 'paasiaispaiva', 'easter'], | ||
keywords_n: ['toinen', 'monday'] | ||
}, | ||
"Toinen Pääsiäispäivä": { | ||
date: 'eastermonday', | ||
keywords: ['pääsiäispäivä', 'paasiaispaiva'], | ||
keywords: ['pääsiäispäivä', 'paasiaispaiva', 'easter', 'monday'], | ||
keywords_y: ['toinen'] | ||
@@ -56,3 +56,3 @@ }, | ||
date: 'ascension', | ||
keywords: ['helatorstai'] | ||
keywords: ['helatorstai', 'ascension'] | ||
} | ||
@@ -59,0 +59,0 @@ }; |
@@ -24,11 +24,12 @@ //! moment-holiday.js locale configuration | ||
date: '1/1', | ||
keywords: ['neujahrstag'] | ||
keywords: ['neujahrstag', 'new', 'year'] | ||
}, | ||
"Karfreitag": { | ||
date: 'goodfriday', | ||
keywords: ['karfreitag'] | ||
keywords: ['karfreitag', 'good', 'friday'] | ||
}, | ||
"Ostersonntag": { | ||
date: 'easter', | ||
keywords: ['ostersonntag'], | ||
keywords: ['ostersonntag', 'easter'], | ||
keywords_n: ['monday'], | ||
regions: ['bb'] | ||
@@ -38,3 +39,3 @@ }, | ||
date: 'eastermonday', | ||
keywords: ['ostermontag'] | ||
keywords: ['ostermontag', 'easter', 'monday'] | ||
}, | ||
@@ -52,7 +53,7 @@ "Heilige Drei Könige": { | ||
date: 'ascensionday', | ||
kaywords: ['christi', 'himmelfahrt'] | ||
kaywords: ['christi', 'himmelfahrt', 'ascension'] | ||
}, | ||
"Pfingstsonntag": { | ||
date: 'pentecost', | ||
keywords: ['pfingstsonntag'], | ||
keywords: ['pfingstsonntag', 'pentecost'], | ||
regions: ['bb'] | ||
@@ -62,7 +63,7 @@ }, | ||
date: 'whitmonday', | ||
keywords: ['pfingstmontag'] | ||
keywords: ['pfingstmontag', 'whit', 'monday'] | ||
}, | ||
"Fronleichnam": { | ||
date: 'corpuschristi', | ||
keywords: ['fronleichnam'], | ||
keywords: ['fronleichnam', 'corpus', 'christi'], | ||
regions: ['bw', 'by', 'he', 'nw', 'rp', 'sl'] | ||
@@ -96,9 +97,4 @@ }, | ||
date: '12/24', | ||
keywords: ['weihnachten'] | ||
keywords: ['weihnachten', 'christmas'] | ||
}, | ||
"Weihnachtsfeiertag": { | ||
date: '12/15', | ||
keywords: ['weihnachtsfeiertag'], | ||
keywords_n: ['zweiter'] | ||
}, | ||
"Zweiter Weihnachtsfeiertag": { | ||
@@ -105,0 +101,0 @@ date: '12/26', |
//! moment-holiday.js | ||
//! version : 1.4.1 | ||
//! version : 1.4.2 | ||
//! author : Kodie Grantham | ||
@@ -247,2 +247,4 @@ //! license : MIT | ||
wn.push(holiday); | ||
} else if (fk = findKey(holiday, h)) { | ||
wn.push(fk); | ||
} else { | ||
@@ -445,2 +447,10 @@ for (var hd in h) { | ||
var findKey = function(find, obj) { | ||
if (obj.constructor === Object) { obj = Object.keys(obj); } | ||
for (var i = 0; i < obj.length; i++) { | ||
if (find.toLowerCase() === obj[i].toLowerCase()) { return obj[i]; } | ||
} | ||
return false; | ||
}; | ||
var merge = function(o1, o2) { | ||
@@ -447,0 +457,0 @@ return Object.assign({}, o1, o2); |
{ | ||
"name": "moment-holiday", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "A Moment.js plugin for handling holidays.", | ||
@@ -10,3 +10,11 @@ "keywords": [ | ||
"holidays", | ||
"calculation" | ||
"calculation", | ||
"united states", | ||
"us", | ||
"canada", | ||
"croatia", | ||
"hrvatska", | ||
"easter", | ||
"finland", | ||
"germany" | ||
], | ||
@@ -13,0 +21,0 @@ "author": { |
@@ -262,2 +262,3 @@ # moment-holiday [![npm version](https://badge.fury.io/js/moment-holiday.svg)](https://badge.fury.io/js/moment-holiday) [![Build Status](https://travis-ci.org/kodie/moment-holiday.svg?branch=master)](https://travis-ci.org/kodie/moment-holiday) | ||
* `Canada/SK` - Saskatchewan | ||
* [Croatia](locale/croatia.js) | ||
* [Finland](locale/finland.js) | ||
@@ -264,0 +265,0 @@ * [Germany](locale/germany.js) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52175
10
986
488
7