colombian-holidays 5.0.6 → 5.0.8

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/colombian-holidays.svg)](https://badge.fury.io/js/colombian-holidays)
4
4
 
5
- TypeScript module to calculate colombian holidays for any given year.
5
+ TypeScript module to get colombian holidays for any given year.
6
6
 
7
7
  ## Installation
8
8
 
package/dist/index.d.mts CHANGED
@@ -21,8 +21,6 @@ declare function getHolidaysForYear(year: number, options?: {
21
21
  valueAsDate: true;
22
22
  }): ColombianHolidayWithNativeDate[];
23
23
 
24
- declare function isHoliday(date: Date): boolean;
25
-
26
24
  declare function holidaysWithinInterval(options: {
27
25
  start: Date;
28
26
  end: Date;
@@ -39,6 +37,8 @@ declare function holidaysWithinInterval(options: {
39
37
  valueAsDate?: boolean;
40
38
  }): ColombianHoliday[] | ColombianHolidayWithNativeDate[];
41
39
 
40
+ declare function isHoliday(date: Date): boolean;
41
+
42
42
  declare const FIRST_HOLIDAY_YEAR = 1583;
43
43
  declare const LAST_HOLIDAY_YEAR = 4099;
44
44
  type MonthNumbers = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
package/dist/index.d.ts CHANGED
@@ -21,8 +21,6 @@ declare function getHolidaysForYear(year: number, options?: {
21
21
  valueAsDate: true;
22
22
  }): ColombianHolidayWithNativeDate[];
23
23
 
24
- declare function isHoliday(date: Date): boolean;
25
-
26
24
  declare function holidaysWithinInterval(options: {
27
25
  start: Date;
28
26
  end: Date;
@@ -39,6 +37,8 @@ declare function holidaysWithinInterval(options: {
39
37
  valueAsDate?: boolean;
40
38
  }): ColombianHoliday[] | ColombianHolidayWithNativeDate[];
41
39
 
40
+ declare function isHoliday(date: Date): boolean;
41
+
42
42
  declare const FIRST_HOLIDAY_YEAR = 1583;
43
43
  declare const LAST_HOLIDAY_YEAR = 4099;
44
44
  type MonthNumbers = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
package/dist/index.js CHANGED
@@ -251,21 +251,6 @@ function getHolidaysForYear(year, { valueAsDate = false } = {}) {
251
251
  return holidays;
252
252
  }
253
253
 
254
- // src/utils/helpers.ts
255
- function isSameDate(date1, date2) {
256
- return date1.getUTCDate() === date2.getUTCDate() && date1.getUTCMonth() === date2.getUTCMonth() && date1.getUTCFullYear() === date2.getUTCFullYear();
257
- }
258
-
259
- // src/utils/isHoliday.ts
260
- function isHoliday(date) {
261
- const holidays = getHolidaysForYear(date.getUTCFullYear(), {
262
- valueAsDate: true
263
- });
264
- return holidays.some(
265
- ({ celebrationDate }) => isSameDate(celebrationDate, date)
266
- );
267
- }
268
-
269
254
  // src/utils/holidaysWithinInterval.ts
270
255
  function holidaysWithinInterval({
271
256
  start,
@@ -294,6 +279,21 @@ function holidaysWithinInterval({
294
279
  }));
295
280
  }
296
281
 
282
+ // src/utils/helpers.ts
283
+ function isSameDate(date1, date2) {
284
+ return date1.getUTCDate() === date2.getUTCDate() && date1.getUTCMonth() === date2.getUTCMonth() && date1.getUTCFullYear() === date2.getUTCFullYear();
285
+ }
286
+
287
+ // src/utils/isHoliday.ts
288
+ function isHoliday(date) {
289
+ const holidays = getHolidaysForYear(date.getUTCFullYear(), {
290
+ valueAsDate: true
291
+ });
292
+ return holidays.some(
293
+ ({ celebrationDate }) => isSameDate(celebrationDate, date)
294
+ );
295
+ }
296
+
297
297
  // src/index.ts
298
298
  var FIRST_HOLIDAY_YEAR = 1583;
299
299
  var LAST_HOLIDAY_YEAR = 4099;
package/dist/index.mjs CHANGED
@@ -209,21 +209,6 @@ function getHolidaysForYear(year, { valueAsDate = false } = {}) {
209
209
  return holidays;
210
210
  }
211
211
 
212
- // src/utils/helpers.ts
213
- function isSameDate(date1, date2) {
214
- return date1.getUTCDate() === date2.getUTCDate() && date1.getUTCMonth() === date2.getUTCMonth() && date1.getUTCFullYear() === date2.getUTCFullYear();
215
- }
216
-
217
- // src/utils/isHoliday.ts
218
- function isHoliday(date) {
219
- const holidays = getHolidaysForYear(date.getUTCFullYear(), {
220
- valueAsDate: true
221
- });
222
- return holidays.some(
223
- ({ celebrationDate }) => isSameDate(celebrationDate, date)
224
- );
225
- }
226
-
227
212
  // src/utils/holidaysWithinInterval.ts
228
213
  function holidaysWithinInterval({
229
214
  start,
@@ -252,6 +237,21 @@ function holidaysWithinInterval({
252
237
  }));
253
238
  }
254
239
 
240
+ // src/utils/helpers.ts
241
+ function isSameDate(date1, date2) {
242
+ return date1.getUTCDate() === date2.getUTCDate() && date1.getUTCMonth() === date2.getUTCMonth() && date1.getUTCFullYear() === date2.getUTCFullYear();
243
+ }
244
+
245
+ // src/utils/isHoliday.ts
246
+ function isHoliday(date) {
247
+ const holidays = getHolidaysForYear(date.getUTCFullYear(), {
248
+ valueAsDate: true
249
+ });
250
+ return holidays.some(
251
+ ({ celebrationDate }) => isSameDate(celebrationDate, date)
252
+ );
253
+ }
254
+
255
255
  // src/index.ts
256
256
  var FIRST_HOLIDAY_YEAR = 1583;
257
257
  var LAST_HOLIDAY_YEAR = 4099;
package/package.json CHANGED
@@ -1,48 +1,43 @@
1
1
  {
2
- "name": "colombian-holidays",
3
- "version": "5.0.6",
4
- "description": "Colombian holidays",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "format": "prettier --write .",
8
- "lint": "eslint . --ext .ts --fix",
9
- "test": "vitest run",
10
- "build": "tsup src/index.ts --dts --format cjs,esm --out-dir dist",
11
- "prepublishOnly": "npm run lint && npm run test && npm run build"
12
- },
13
- "license": "MIT",
14
- "bugs": {
15
- "url": "https://github.com/MauricioRobayo/colombian-holidays/issues"
16
- },
17
- "homepage": "https://github.com/MauricioRobayo/colombian-holidays",
18
- "author": "Mauricio Robayo <rfmajo@gmail.com> (https://www.mauriciorobayo.com)",
19
- "keywords": [
20
- "Colombian holidays",
21
- "Festivos en Colombia",
22
- "Colombia",
23
- "Festivos",
24
- "Holidays"
25
- ],
26
- "devDependencies": {
27
- "@eslint/js": "^9.32.0",
28
- "eslint": "^9.32.0",
29
- "prettier": "^3.6.2",
30
- "tsup": "^8.5.0",
31
- "typescript": "^5.8.3",
32
- "typescript-eslint": "^8.38.0",
33
- "vitest": "^3.2.4"
34
- },
35
- "dependencies": {
36
- "pascua": "^2.1.8"
37
- },
38
- "files": [
39
- "dist"
40
- ],
41
- "repository": {
42
- "type": "git",
43
- "url": "https://github.com/MauricioRobayo/colombian-holidays.git"
44
- },
45
- "release": {
46
- "branches": "main"
47
- }
2
+ "name": "colombian-holidays",
3
+ "version": "5.0.8",
4
+ "description": "Colombian holidays",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "format": "biome format --write",
9
+ "lint": "biome lint --write",
10
+ "test": "vitest run",
11
+ "build": "tsup src/index.ts --dts --format cjs,esm --out-dir dist",
12
+ "prepublishOnly": "biome check && npm test && npm run build"
13
+ },
14
+ "license": "MIT",
15
+ "bugs": {
16
+ "url": "https://github.com/MauricioRobayo/colombian-holidays/issues"
17
+ },
18
+ "homepage": "https://github.com/MauricioRobayo/colombian-holidays",
19
+ "author": "Mauricio Robayo <rfmajo@gmail.com> (https://www.mauriciorobayo.com)",
20
+ "keywords": [
21
+ "Colombian holidays",
22
+ "Festivos en Colombia",
23
+ "Colombia",
24
+ "Festivos",
25
+ "Holidays"
26
+ ],
27
+ "devDependencies": {
28
+ "@biomejs/biome": "2.1.3",
29
+ "tsup": "^8.5.0",
30
+ "typescript": "^5.9.2",
31
+ "vitest": "^3.2.4"
32
+ },
33
+ "dependencies": {
34
+ "pascua": "^2.1.13"
35
+ },
36
+ "files": [
37
+ "dist"
38
+ ],
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/MauricioRobayo/colombian-holidays.git"
42
+ }
48
43
  }