shamsi-holidays
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -46,2 +46,3 @@ "use strict"; | ||
var util_1 = require("./util"); | ||
var path = require("path"); | ||
var requestToTime = function (month, year) { return __awaiter(void 0, void 0, void 0, function () { | ||
@@ -256,3 +257,3 @@ var defer, crawler; | ||
return __awaiter(void 0, void 0, void 0, function () { | ||
var isHoliday, year, fileName, staticHolidays; | ||
var isHoliday, year, filePath, staticHolidays; | ||
return __generator(this, function (_a) { | ||
@@ -262,4 +263,4 @@ isHoliday = false; | ||
year = moment(date, 'jYYYY/jMM/jDD').format('jYYYY'); | ||
fileName = "./static-holidays-data/holidays" + year + ".json"; | ||
staticHolidays = (0, util_1.readFile)(fileName); | ||
filePath = path.join(__dirname, "/static-holidays-data/holidays" + year + ".json"); | ||
staticHolidays = (0, util_1.readFile)(filePath); | ||
if (staticHolidays.length !== 0) { | ||
@@ -287,7 +288,7 @@ try { | ||
return __awaiter(void 0, void 0, void 0, function () { | ||
var fileName, staticHolidays; | ||
var filePath, staticHolidays; | ||
return __generator(this, function (_a) { | ||
year = (year) ? year : moment().format('jYYYY'); | ||
fileName = "./static-holidays-data/holidays" + year + ".json"; | ||
staticHolidays = (0, util_1.readFile)(fileName); | ||
filePath = path.join(__dirname, "/static-holidays-data/holidays" + year + ".json"); | ||
staticHolidays = (0, util_1.readFile)(filePath); | ||
if (staticHolidays.length !== 0) { | ||
@@ -294,0 +295,0 @@ return [2 /*return*/, staticHolidays]; |
@@ -31,6 +31,6 @@ "use strict"; | ||
// // console.log("isHolidaysOnline:", x3); | ||
// let x4 = await updateStaticHolidayDays('1406') | ||
// console.log("updateStaticHolidayDays:", x4); | ||
// // let x5 = await isHoliday("1400/01/01") | ||
// // console.log("isHoliday:", x5); | ||
// // let x4 = await updateStaticHolidayDays('1406') | ||
// // console.log("updateStaticHolidayDays:", x4); | ||
// let x5 = await isHoliday("1400/01/01") | ||
// console.log("isHoliday:", x5); | ||
// // let x6 = await getHolidays("1400") | ||
@@ -37,0 +37,0 @@ // // console.log("getHolidays:", x6); |
{ | ||
"name": "shamsi-holidays", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "This module provides dates of holidays for Iran", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
44365
483