@apiverve/workingdays 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -4
- package/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Working Days API
|
|
2
2
|
|
|
3
|
-
Working Days is a working days and business days API that counts the working days and non-working days for any country and month. Pass a two-letter country code and month number to get total counts, working date lists, and non-working days marked with holiday names.
|
|
3
|
+
Working Days is a working days and business days API that counts the working days and non-working days for any country and month. Pass a two-letter country code and month number to get total counts, working date lists, and non-working days marked with holiday names. On paid plans, add a state or region for regional holidays, set a custom weekend, count between any two dates, or add business days to a date.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@apiverve/workingdays)
|
|
6
6
|
|
|
@@ -59,7 +59,12 @@ Using the API is simple. All you have to do is make a request. The API will retu
|
|
|
59
59
|
var query = {
|
|
60
60
|
country: "US",
|
|
61
61
|
month: 10,
|
|
62
|
-
year: 2026
|
|
62
|
+
year: 2026,
|
|
63
|
+
region: "CA",
|
|
64
|
+
weekend: "fri,sat",
|
|
65
|
+
start: "2026-03-01",
|
|
66
|
+
end: "2026-03-31",
|
|
67
|
+
addDays: 10
|
|
63
68
|
};
|
|
64
69
|
|
|
65
70
|
api.execute(query, function (error, data) {
|
|
@@ -81,7 +86,12 @@ You can also use promises to make requests. The API returns a promise that you c
|
|
|
81
86
|
var query = {
|
|
82
87
|
country: "US",
|
|
83
88
|
month: 10,
|
|
84
|
-
year: 2026
|
|
89
|
+
year: 2026,
|
|
90
|
+
region: "CA",
|
|
91
|
+
weekend: "fri,sat",
|
|
92
|
+
start: "2026-03-01",
|
|
93
|
+
end: "2026-03-31",
|
|
94
|
+
addDays: 10
|
|
85
95
|
};
|
|
86
96
|
|
|
87
97
|
api.execute(query)
|
|
@@ -104,7 +114,12 @@ async function makeRequest() {
|
|
|
104
114
|
var query = {
|
|
105
115
|
country: "US",
|
|
106
116
|
month: 10,
|
|
107
|
-
year: 2026
|
|
117
|
+
year: 2026,
|
|
118
|
+
region: "CA",
|
|
119
|
+
weekend: "fri,sat",
|
|
120
|
+
start: "2026-03-01",
|
|
121
|
+
end: "2026-03-31",
|
|
122
|
+
addDays: 10
|
|
108
123
|
};
|
|
109
124
|
|
|
110
125
|
try {
|
package/index.js
CHANGED
|
@@ -30,7 +30,7 @@ class workingdaysWrapper {
|
|
|
30
30
|
this.baseURL = 'https://api.apiverve.com/v1/workingdays';
|
|
31
31
|
|
|
32
32
|
// Validation rules for parameters (generated from schema)
|
|
33
|
-
this.validationRules = {"country":{"type":"string","required":true,"minLength":2,"maxLength":2},"month":{"type":"integer","required":false,"min":1,"max":12},"year":{"type":"integer","required":false,"min":2000,"max":2050,"default":2026}};
|
|
33
|
+
this.validationRules = {"country":{"type":"string","required":true,"minLength":2,"maxLength":2},"month":{"type":"integer","required":false,"min":1,"max":12},"year":{"type":"integer","required":false,"min":2000,"max":2050,"default":2026},"region":{"type":"string","required":false,"maxLength":5},"weekend":{"type":"string","required":false,"maxLength":60},"start":{"type":"string","required":false,"format":"date"},"end":{"type":"string","required":false,"format":"date"},"addDays":{"type":"integer","required":false,"min":-250,"max":250,"format":"date"}};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apiverve/workingdays",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "Working Days is a working days and business days API that counts the working days and non-working days for any country and month. Pass a two-letter country code and month number to get total counts, working date lists, and non-working days marked with holiday names.",
|
|
3
|
+
"version": "1.2.5",
|
|
4
|
+
"description": "Working Days is a working days and business days API that counts the working days and non-working days for any country and month. Pass a two-letter country code and month number to get total counts, working date lists, and non-working days marked with holiday names. On paid plans, add a state or region for regional holidays, set a custom weekend, count between any two dates, or add business days to a date.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"sideEffects": false,
|