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

@auronet/holidays

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@auronet/holidays - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

dist/index.d.ts

@@ -0,4 +1,7 @@

import { PublicHoliday } from './lib/PublicHoliday.js';
export default class Holidays {
private provider;
constructor(country: string);
getHolidays(year: number, state?: string, region?: string): PublicHoliday[];
isHoliday(date: Date, state?: string, region?: string): string;
}

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

import { DateTime } from 'luxon';
import { HolidayProvider } from './lib/HolidayProvider.js';

@@ -71,2 +72,13 @@ import { ATProvider, BEProvider, CHProvider, CZProvider, DEProvider, ESProvider, FRProvider, GRProvider, HRProvider, HUProvider, IEProvider, ITProvider, LTProvider, NLProvider, PLProvider, PTProvider, ROProvider, SKProvider, TRProvider, UKProvider, } from './HolidayProviders/index.js';

}
getHolidays(year, state, region) {
return this.provider.getHolidays(year, state, region);
}
isHoliday(date, state, region) {
const holidays = this.provider.getHolidays(date.getFullYear(), state, region);
const found = holidays.filter((h) => h.date === DateTime.fromJSDate(date).toFormat('yyyy-MM-dd'));
if (found && found.length && (found[0].launchYear <= date.getFullYear() || !found[0].launchYear)) {
return found[0].name;
}
return null;
}
}
import { PublicHoliday } from './PublicHoliday.js';
export interface ProviderInterface {
getAllHolidays(year: number): PublicHoliday[];
getHolidays?(year: number, state: string, region: string): PublicHoliday[];
}

2

package.json
{
"name": "@auronet/holidays",
"version": "1.0.0",
"version": "1.0.1",
"scripts": {

@@ -5,0 +5,0 @@ "test": "yarn jest --detectOpenHandles",

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