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

pascua

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pascua - npm Package Compare versions

Comparing version 1.1.11 to 1.1.12

2

dist/pascua.js

@@ -1,1 +0,1 @@

(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.pascua={exports:{}}.exports}})("undefined"==typeof globalThis?"undefined"==typeof self?this:self:globalThis,function(){"use strict";function a(a){var b=Number.parseInt(a,10);if(Number.isNaN(b)||1984>b)throw new Error("Invalid year. Should be an integer > 1983");return b}function b(b){return"[object Date]"===Object.prototype.toString.call(b)&&a(b.getFullYear())}function c(a,b){var c=new Date(a.getTime());return c.setDate(c.getDate()+b),c}function d(a,b){return a.getDate()===b.getDate()&&a.getMonth()===b.getMonth()}function e(a,b){var c=new Date(a.getTime());return c.setDate(a.getDate()+(7+b-a.getDay())%7),c}function f(a){var b=Math.floor,c=a%19,d=b(a/100),e=a%100,f=b(d/4),g=b((d+8)/25),h=b((d-g+1)/3),i=(19*c+d-f-h+15)%30,j=b(e/4),k=(32+2*(d%4)+2*j-i-e%4)%7,l=b((c+11*i+22*k)/451),m=i+k-7*l+114,n=b(m/31),o=new Date(a,n-1,1+m%31);return o}var g=[{type:1,name:"A\xF1o Nuevo",day:1,month:1},{type:1,name:"D\xEDa del Trabajo",day:1,month:5},{type:1,name:"Grito de la Independencia",day:20,month:7},{type:1,name:"Batalla de Boyac\xE1",day:7,month:8},{type:1,name:"Inmaculada Concepci\xF3n",day:8,month:12},{type:1,name:"Navidad",day:25,month:12},{type:2,name:"Reyes Magos",day:6,month:1},{type:2,name:"San Jos\xE9",day:19,month:3},{type:2,name:"San Pedro y San Pablo",day:29,month:6},{type:2,name:"Asunci\xF3n de la Virgen",day:15,month:8},{type:2,name:"D\xEDa de la Raza",day:12,month:10},{type:2,name:"Todos los Santos",day:1,month:11},{type:2,name:"Independencia de Cartagena",day:11,month:11},{type:3,name:"Jueves Santo",offset:-3},{type:3,name:"Viernes Santo",offset:-2},{type:3,name:"Ascensi\xF3n de Jes\xFAs",offset:43},{type:3,name:"Corpus Christi",offset:64},{type:3,name:"Sagrado Coraz\xF3n de Jes\xFAs",offset:71}];module.exports={getHoliday:function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new Date;if(!b(a))throw new Error("Invalid date.");for(var h=a.getFullYear(),j=0;j<g.length;j+=1){if(1===g[j].type){var o=new Date(h,g[j].month-1,g[j].day);if(d(a,o))return g[j].name}if(2===g[j].type){var k=new Date(h,g[j].month-1,g[j].day),l=e(k,1);if(d(a,l))return g[j].name}if(3===g[j].type){var m=f(h),n=c(m,g[j].offset);if(d(a,n))return g[j].name}}return""},getAllHolidays:function(){for(var b,d=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new Date().getFullYear(),h=a(d),j=[],k=0;k<g.length;k+=1)b=void 0,1===g[k].type&&(b=new Date(h,g[k].month-1,g[k].day)),2===g[k].type&&(b=e(new Date(h,g[k].month-1,g[k].day),1)),3===g[k].type&&(b=c(f(h),g[k].offset)),j.push({date:b.toISOString().substring(0,10),type:g[k].type,name:g[k].name});return j}}});
(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.pascua={exports:{}}.exports}})("undefined"==typeof globalThis?"undefined"==typeof self?this:self:globalThis,function(){"use strict";function a(a){var b=Number.parseInt(a,10);if(Number.isNaN(b)||1984>b)throw new Error("Invalid year. Should be an integer > 1983")}function b(b){try{a(b.getFullYear())}catch(a){throw new Error(a instanceof TypeError?"Invalid date.":a)}}function c(a,b){var c=new Date(a.getTime());return c.setDate(c.getDate()+b),c}function d(a,b){return a.getDate()===b.getDate()&&a.getMonth()===b.getMonth()}function e(a,b){var c=new Date(a.getTime());return c.setDate(a.getDate()+(7+b-a.getDay())%7),c}function f(a){var b=Math.floor,c=a%19,d=b(a/100),e=a%100,f=b(d/4),g=b((d+8)/25),h=b((d-g+1)/3),i=(19*c+d-f-h+15)%30,j=b(e/4),k=(32+2*(d%4)+2*j-i-e%4)%7,l=b((c+11*i+22*k)/451),m=i+k-7*l+114,n=b(m/31),o=new Date(a,n-1,1+m%31);return o}function g(a,b){var d=new Date(b,a.month-1,a.day);return 2===a.type&&(d=e(d,1)),3===a.type&&(d=c(f(b),a.offset)),d}var h=[{type:1,name:"A\xF1o Nuevo",day:1,month:1},{type:1,name:"D\xEDa del Trabajo",day:1,month:5},{type:1,name:"Grito de la Independencia",day:20,month:7},{type:1,name:"Batalla de Boyac\xE1",day:7,month:8},{type:1,name:"Inmaculada Concepci\xF3n",day:8,month:12},{type:1,name:"Navidad",day:25,month:12},{type:2,name:"Reyes Magos",day:6,month:1},{type:2,name:"San Jos\xE9",day:19,month:3},{type:2,name:"San Pedro y San Pablo",day:29,month:6},{type:2,name:"Asunci\xF3n de la Virgen",day:15,month:8},{type:2,name:"D\xEDa de la Raza",day:12,month:10},{type:2,name:"Todos los Santos",day:1,month:11},{type:2,name:"Independencia de Cartagena",day:11,month:11},{type:3,name:"Jueves Santo",offset:-3},{type:3,name:"Viernes Santo",offset:-2},{type:3,name:"Ascensi\xF3n de Jes\xFAs",offset:43},{type:3,name:"Corpus Christi",offset:64},{type:3,name:"Sagrado Coraz\xF3n de Jes\xFAs",offset:71}];module.exports={getHoliday:function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new Date;b(a);var c=h.find(function(b){return d(a,g(b,a.getFullYear()))});return c?c.name:""},getAllHolidays:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new Date().getFullYear();return a(b),h.map(function(a){return{date:g(a,b).toISOString().substring(0,10),type:a.type,name:a.name}})}}});
{
"name": "pascua",
"version": "1.1.11",
"version": "1.1.12",
"description": "Colombian holidays",

@@ -5,0 +5,0 @@ "main": "dist/pascua.js",

@@ -11,3 +11,3 @@ # Pascua 🎆

[![codecov](https://codecov.io/gh/MauricioRobayo/pascua/branch/master/graph/badge.svg)](https://codecov.io/gh/MauricioRobayo/pascua)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a64471b907c44f7587aea4e3aab9d442)](https://www.codacy.com/app/MauricioRobayo/pascua?utm_source=github.com&utm_medium=referral&utm_content=MauricioRobayo/pascua&utm_campaign=Badge_Grade)
[![codebeat badge](https://codebeat.co/badges/2f0f841e-a8f8-4427-a28d-7cc4b7314094)](https://codebeat.co/projects/github-com-mauriciorobayo-pascua-master)
[![Greenkeeper badge](https://badges.greenkeeper.io/MauricioRobayo/pascua.svg)](https://greenkeeper.io/)

@@ -14,0 +14,0 @@

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