moment-ferie-fr
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -36,3 +36,3 @@ // https://github.com/damienlabat/moment-ferie-fr | ||
} | ||
return this.paques(Y).add(1, "days"); | ||
return moment.fn.paques(Y).add(1, "days"); | ||
}; | ||
@@ -44,3 +44,3 @@ | ||
} | ||
return this.paques(Y).add(39, "days"); | ||
return moment.fn.paques(Y).add(39, "days"); | ||
}; | ||
@@ -52,3 +52,3 @@ | ||
} | ||
return this.paques(Y).add(50, "days"); | ||
return moment.fn.paques(Y).add(50, "days"); | ||
}; | ||
@@ -127,7 +127,11 @@ | ||
moment.fn.getFerieList = function () { | ||
moment.fn.getFerieList = function (Y) { | ||
if (Y === undefined) { | ||
Y = this.year(); | ||
} | ||
var res = []; | ||
for (var key in listeFerie) { | ||
if (listeFerie.hasOwnProperty(key)) { | ||
res.push({name: key, date: listeFerie[key].call(this) }); | ||
res.push({name: key, date: listeFerie[key](Y) }); | ||
} | ||
@@ -141,3 +145,3 @@ } | ||
if (listeFerie.hasOwnProperty(key)) { | ||
if (this.isSame(listeFerie[key].call(this))) { | ||
if (this.isSame(listeFerie[key].call(this), 'days')) { | ||
return key; | ||
@@ -175,2 +179,2 @@ } | ||
}).call(this); | ||
}).call(this); |
{ | ||
"name": "moment-ferie-fr", | ||
"version": "0.1.1", | ||
"description": "An extension to moment.js that handles working days in France", | ||
"main": "moment-ferie-fr.js", | ||
"scripts": { | ||
"test": "node test.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/DepthFrance/moment-ferie-fr.git" | ||
}, | ||
"author": "damienlabat", | ||
"homepage": "https://github.com/DepthFrance/moment-ferie-fr", | ||
"dependencies": { | ||
"moment": "^2.4.0" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.5", | ||
"grunt-release": "~0.7.0" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/DepthFrance/moment-ferie-fr/issues" | ||
}, | ||
"keywords": [ | ||
"moment", | ||
"ferie", | ||
"holiday", | ||
"date" | ||
], | ||
"license": "ISC" | ||
} | ||
"name": "moment-ferie-fr", | ||
"version": "0.2.0", | ||
"description": "An extension to moment.js that handles working days in France", | ||
"main": "moment-ferie-fr.js", | ||
"scripts": { | ||
"test": "node test.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/DepthFrance/moment-ferie-fr.git" | ||
}, | ||
"author": "damienlabat", | ||
"homepage": "https://github.com/DepthFrance/moment-ferie-fr", | ||
"dependencies": { | ||
"moment": "^2.4.0" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.5", | ||
"grunt-release": "~0.7.0" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/DepthFrance/moment-ferie-fr/issues" | ||
}, | ||
"keywords": [ | ||
"moment", | ||
"ferie", | ||
"holiday", | ||
"date" | ||
], | ||
"license": "ISC" | ||
} |
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
15599
13
221