Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

date-holidays

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date-holidays - npm Package Compare versions

Comparing version 0.1.10 to 0.2.0

data/countries/0.yaml

13

CHANGELOG.md
# CHANGELOG
v0.2.0
- split each country into a single yaml file
- DE: Correction of holidays in BY, SN, TH
- DE-BB: fix easter, pentecoste to "public"
- DE-BY: use 08-15 as public in favor of population majority
- Set 10-31 to observance
- Add missing "Fronleichnam" to regions to DE-SN and DE-TH
- Fix DE-BY holiday „Mariä Himmelfahrt“
- Add missing school DE-BW holidays
- Add missing DE Holiday on 2017-10-31
- Fix DE holiday „Buß- und Bettag“
- DE: Add Totensonntag, Volkstrauertag
v0.1.10

@@ -4,0 +17,0 @@ - fix for US New Years Eve

4

CONTRIBUTING.md

@@ -7,3 +7,3 @@ # Contributing

## Contributing changes to `holidays.yaml`
## Contributing changes

@@ -14,3 +14,3 @@ If you like to add or change data please take a look at [holidays.yaml specification].

2. Create a branch for your changes
3. Modify [`data/holidays.yaml`](./data/holidays.yaml) for holiday data and/or [`data/names.yaml`](.data/names.yaml) for translations as appropriate
3. Modify the yaml file for the country your changes apply in `./data/countries/<code>.yaml` for holiday data and/or `./data/names.yaml` for translations as appropriate
4. Generate the Json file from the yaml files with

@@ -17,0 +17,0 @@ ```

@@ -45,8 +45,4 @@ /**

Object.keys(countries).forEach(function (k) {
var l = countries[k].langs[0]
if (countries[k].names[lang]) {
l = lang
}
o[k] = countries[k].names[l] || k
})
o[k] = this._name(countries, k, lang)
}.bind(this))
return o

@@ -58,5 +54,6 @@ },

* @param {String} country
* @param {String} [lang] - Iso-639 shortcode
* @return {Object} shortcode-name value pairs. E.g. `{ b: 'Burgenland', ... }`
*/
getStates: function (country) {
getStates: function (country, lang) {
country = country.toUpperCase()

@@ -67,4 +64,4 @@ var o = {}

Object.keys(states).forEach(function (k) {
o[k] = states[k].name || k
})
o[k] = this._name(states, k, lang)
}.bind(this))
return o

@@ -78,5 +75,6 @@ }

* @param {String} state
* @param {String} [lang] - Iso-639 shortcode
* @return {Object} shortcode-name value pairs.
*/
getRegions: function (country, state) {
getRegions: function (country, state, lang) {
var tmp

@@ -93,4 +91,4 @@ if ((tmp = Data.splitName(country, state))) {

Object.keys(regions).forEach(function (k) {
o[k] = regions[k].name || k
})
o[k] = this._name(regions, k, lang)
}.bind(this))
return o

@@ -101,2 +99,17 @@ }

/**
* @private
*/
_name: function (obj, key, lang) {
lang = lang || (obj[key].langs && obj[key].langs[0])
var name
var tmp
if ((tmp = obj[key].names)) {
if (!(lang && (name = tmp[lang]))) {
name = tmp[Object.keys(tmp)[0]]
}
}
return name || obj[key].name || key
},
/**
* get languages for selected country, state, region

@@ -103,0 +116,0 @@ * @return {Array} containing ISO 639-1 language shortcodes

{
"name": "date-holidays",
"version": "0.1.10",
"version": "0.2.0",
"description": "worldwide holidays",
"keywords": [
"holidays"
],
"homepage": "https://github.com/commenthol/date-holidays",
"bugs": {
"url": "https://github.com/commenthol/date-holidays/issues"
},
"license": "ISC",
"author": "commenthol <commenthol@gmail.com>",
"contributors": [
"Mauro Braggio <m.braggio@e-time.it>",
"Quennie <simply.me.queeny@gmail.com>",
"Christian Schinnerl <Schinnerl.Christian@gmail.com>",
"James Dixon <jim.w.dixon@gmail.com>",
"Lukas Eipert <git@leipert.io>"
],
"main": "lib",
"bin": {
"holidays2json": "./build/holidays2json.js"
"holidays2json": "./scripts/holidays2json.js"
},

@@ -12,8 +28,21 @@ "directories": {

},
"contributors": [
"Mauro Braggio <m.braggio@e-time.it>",
"Quennie <simply.me.queeny@gmail.com>",
"Christian Schinnerl <Schinnerl.Christian@gmail.com>",
"James Dixon <jim.w.dixon@gmail.com>"
],
"repository": {
"type": "git",
"url": "https://github.com/commenthol/date-holidays.git"
},
"scripts": {
"all": "npm run clean && npm i && npm run yaml && npm run lint && npm test && npm pack",
"clean": "rimraf coverage node_modules",
"cover": "istanbul cover _mocha --report lcov --report text -- -R dot --check-leaks test/*.mocha.js",
"lint": "eslint --quiet '**/*.js'",
"test": "mocha -R dot test/*.mocha.js",
"watch": "watch-run -p data/countries/*.yaml npm run yaml",
"yaml": "node scripts/holidays2json.js"
},
"eslintConfig": {
"extends": "standard",
"plugins": [
"standard"
]
},
"dependencies": {

@@ -37,31 +66,3 @@ "date-easter": "^0.2.2",

},
"scripts": {
"test": "mocha test/*.mocha.js",
"all": "npm run clean && npm i && npm run yaml && npm run lint && npm test && npm pack",
"yaml": "node build/holidays2json.js",
"cover": "istanbul cover _mocha --report lcov --report text -- -R dot --check-leaks test/*.mocha.js",
"lint": "eslint --quiet '**/*.js'",
"watch": "watch-run -p data/*.yaml npm run yaml",
"clean": "rimraf coverage node_modules"
},
"repository": {
"type": "git",
"url": "https://github.com/commenthol/date-holidays.git"
},
"keywords": [
"holidays"
],
"author": "commenthol <commenthol@gmail.com>",
"maintainers": "commenthol <commenthol@gmail.com>",
"license": "ISC",
"bugs": {
"url": "https://github.com/commenthol/date-holidays/issues"
},
"homepage": "https://github.com/commenthol/date-holidays",
"eslintConfig": {
"extends": "standard",
"plugins": [
"standard"
]
}
"maintainers": "commenthol <commenthol@gmail.com>"
}

@@ -53,4 +53,4 @@ # date-holidays

│ └── vella: Andorra la Vella
├── AM: Հայաստան
├── AO: Angola
├── AM: Հայաստան
├── AR: Argentina

@@ -107,2 +107,3 @@ ├── AT: Österreich

├── CF: République centrafricaine
├── CG: République du Congo
├── CH: Schweiz

@@ -140,3 +141,2 @@ │ ├── zh: Kanton Zürich

│ └── ta: Tarapacá
├── CG: République du Congo
├── CM: Cameroun

@@ -148,3 +148,2 @@ ├── CO: Colombia

├── CZ: Česká republika
├── DK: Danmark
├── DE: Deutschland

@@ -154,3 +153,4 @@ │ ├── bb: Brandenburg

│ ├── by: Bayern
│ │ └── a: Stadt Augsburg
│ │ ├── a: Stadt Augsburg
│ │ └── evang: Überwiegend evangelische Gemeinden
│ ├── hb: Hansestadt Bremen

@@ -166,4 +166,9 @@ │ ├── he: Hessen

│ ├── sn: Sachsen
│ │ └── bz: Landkreis Bautzen
│ ├── st: Sachsen-Anhalt
│ └── th: Thüringen
│ ├── eic: Landkreis Eichfeld
│ ├── uh: Unstrut-Hainich-Kreis
│ └── wak: Wartburgkreis
├── DK: Danmark
├── DO: República Dominicana

@@ -197,4 +202,4 @@ ├── EC: Ecuador

├── GD: Grenada
├── GQ: República de Guinea Ecuatorial
├── GR: Ελλάδα
├── GQ: República de Guinea Ecuatorial
├── GT: Guatemala

@@ -209,8 +214,8 @@ ├── GU: Guam

├── IE: Ireland
├── IS: Ísland
├── IT: Italia
│ └── suedtirol: Südtirol, Alto Adige
├── IS: Ísland
├── JM: Jamaica
├── JP: 日本
├── KE: KE
├── KE: Kenia
├── LI: Lichtenstein

@@ -223,6 +228,6 @@ ├── LT: Lietuva

├── MG: Repoblikan'i Madagasikara
├── MT: Malta
├── MW: Malawi
├── MX: México
├── MT: Malta
├── MZ: Moçambique
├── MW: Malawi
├── NA: Namibia

@@ -262,11 +267,2 @@ ├── NI: Nicaragua

├── TZ: Tanzania
├── VE: Venezuela
│ ├── an: Anzoátegui
│ ├── ca: Carabobo
│ ├── la: Lara
│ │ └── ba: Barquisimeto
│ ├── mi: Miranda
│ ├── mo: Monagas
│ ├── ta: Táchira
│ └── zu: Zulia
├── UG: Uganda

@@ -327,2 +323,11 @@ ├── US: United States of America

├── UY: Uruguay
├── VE: Venezuela
│ ├── an: Anzoátegui
│ ├── ca: Carabobo
│ ├── la: Lara
│ │ └── ba: Barquisimeto
│ ├── mi: Miranda
│ ├── mo: Monagas
│ ├── ta: Táchira
│ └── zu: Zulia
├── ZA: South Africa

@@ -329,0 +334,0 @@ ├── ZM: Zambia

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc