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.8 to 1.1.9

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}})(this,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");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}}});
{
"name": "pascua",
"version": "1.1.8",
"version": "1.1.9",
"description": "Colombian holidays",

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

@@ -6,2 +6,3 @@ # Pascua 🎆

[![Blazing Fast](https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg?style=flat-square)](https://twitter.com/acdlite/status/974390255393505280)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FMauricioRobayo%2Fpascua.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FMauricioRobayo%2Fpascua?ref=badge_shield)

@@ -102,4 +103,2 @@ [![npm version](https://badge.fury.io/js/pascua.svg)](https://badge.fury.io/js/pascua)

[MIT](LICENSE).
Made in ![Bandera de Colombia](https://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Flag_of_Colombia.svg/16px-Flag_of_Colombia.svg.png).
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FMauricioRobayo%2Fpascua.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FMauricioRobayo%2Fpascua?ref=badge_large)

Sorry, the diff of this file is not supported yet

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