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

date-holidays

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date-holidays - npm Package Compare versions

Comparing version 1.4.5 to 1.4.6

4

CHANGELOG.md
# CHANGELOG
v1.4.6
- c0b5082 chore(typescript): fix ts typings
v1.4.5

@@ -4,0 +8,0 @@

15

package.json
{
"name": "date-holidays",
"version": "1.4.5",
"version": "1.4.6",
"description": "worldwide holidays",

@@ -39,2 +39,3 @@ "keywords": [

"Oscar Lagercrantz <oscar.lagercrantz@gmail.com>",
"Petar Kovačević <pero.5ar@gmail.com>",
"rbrasco <roger.brasco@scytl.com>",

@@ -135,4 +136,4 @@ "Roman Hirsch <r.hirsch@brendow.de>",

"babel-loader": "^8.0.6",
"dtslint": "^0.9.8",
"eslint": "^6.5.1",
"dtslint": "^1.0.2",
"eslint": "^6.6.0",
"eslint-config-standard": "^14.1.0",

@@ -145,3 +146,3 @@ "eslint-plugin-import": "^2.18.2",

"markedpp": "^1.0.1",
"mocha": "^6.2.1",
"mocha": "^6.2.2",
"npm-run-all": "^4.1.5",

@@ -152,5 +153,5 @@ "parallel-webpack": "^2.4.0",

"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.41.1",
"webpack-bundle-analyzer": "^3.5.2",
"webpack-cli": "^3.3.9"
"webpack": "^4.41.2",
"webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.10"
},

@@ -157,0 +158,0 @@ "engines": {

@@ -1,74 +0,91 @@

// TypeScript Version: 2.2
// TypeScript Version: 3.3
declare module 'date-holidays' {
export interface Country {
country: string;
state?: string;
region?: string;
}
namespace Holidays {
export interface Country {
country: string;
state?: string;
region?: string;
}
export type HolidayType = "public" | "bank" | "school" | "observance";
export type HolidayType = 'public' | 'bank' | 'school' | 'observance';
export interface Options {
languages?: string | ReadonlyArray<string>;
timezone?: string;
types?: ReadonlyArray<HolidayType>;
}
export interface Options {
languages?: string | string[];
timezone?: string;
types?: HolidayType[];
}
export interface HolidayOptions {
name: { [key: string]: string };
type: HolidayType;
}
export interface HolidayOptions {
name: { [key: string]: string; };
type: HolidayType;
}
export interface Holiday {
date: string;
start: Date;
end: Date;
name: string;
type: HolidayType;
substitute?: boolean;
}
export interface Holiday {
date: string;
start: Date;
end: Date;
name: string;
type: HolidayType;
substitute?: boolean;
}
export interface HolidaysInterface {
init(country?: Country | string, opts?: Options): void;
export interface HolidaysInterface {
init(country?: Country | string, opts?: Options): void;
init(country?: string, state?: string, opts?: Options): void;
init(country?: string, state?: string, opts?: Options): void;
init(country?: string, state?: string, region?: string, opts?: Options): void;
init(country?: string, state?: string, region?: string, opts?: Options): void;
setHoliday(rule: string, opts: HolidayOptions | string): boolean;
setHoliday(rule: string, opts: HolidayOptions | string): boolean;
getHolidays(year?: string | number | Date, lang?: string): Holiday[];
getHolidays(year?: string | number | Date, lang?: string): Holiday[];
isHoliday(date: Date): Holiday;
isHoliday(date: Date): Holiday;
query(country?: string, state?: string, lang?: string): { [key: string]: string };
query(country?: string, state?: string, lang?: string): { [key: string]: string; };
getCountries(lang?: string): { [key: string]: string };
getCountries(lang?: string): { [key: string]: string; };
getStates(country: string, lang?: string): { [key: string]: string };
getStates(country: string, lang?: string): { [key: string]: string; };
getRegions(country: string, state: string, lang?: string): { [key: string]: string };
getRegions(country: string, state: string, lang?: string): { [key: string]: string; };
getTimezones(): string[];
getTimezones(): string[];
setTimezone(timezone: string): void;
setTimezone(timezone: string): void;
getLanguages(): string[];
getLanguages(): string[];
setLanguage(language: string | string[]): string[];
setLanguage(language: string | string[]): string[];
getDayOff(): string;
getDayOff(): string;
}
}
interface HolidaysConstructor {
new (opts?: Options): HolidaysInterface;
new (country: Country | string, opts?: Options): HolidaysInterface;
new (country: Country | string, state: string, opts?: Options): HolidaysInterface;
new (country: Country | string, state: string, region: string, opts?: Options): HolidaysInterface;
class Holidays implements Holidays.HolidaysInterface {
constructor(opts?: Holidays.Options);
constructor(country: Holidays.Country | string, opts?: Holidays.Options);
constructor(country: Holidays.Country | string, state: string, opts?: Holidays.Options);
constructor(country: Holidays.Country | string, state: string, region: string, opts?: Holidays.Options);
// HolidaysInterface:
init(country?: Holidays.Country | string, opts?: Holidays.Options): void;
init(country?: string, state?: string, opts?: Holidays.Options): void;
init(country?: string, state?: string, region?: string, opts?: Holidays.Options): void;
setHoliday(rule: string, opts: Holidays.HolidayOptions | string): boolean;
getHolidays(year?: string | number | Date, lang?: string): Holidays.Holiday[];
isHoliday(date: Date): Holidays.Holiday;
query(country?: string, state?: string, lang?: string): { [key: string]: string; };
getCountries(lang?: string): { [key: string]: string; };
getStates(country: string, lang?: string): { [key: string]: string; };
getRegions(country: string, state: string, lang?: string): { [key: string]: string; };
getTimezones(): string[];
setTimezone(timezone: string): void;
getLanguages(): string[];
setLanguage(language: string | string[]): string[];
getDayOff(): string;
}
let Holidays: HolidaysConstructor;
export default Holidays;
export = Holidays;
}

@@ -1,3 +0,5 @@

import Holidays, { Holiday } from 'date-holidays';
import * as Holidays from 'date-holidays';
type Holiday = Holidays.Holiday;
const hd = new Holidays('');

@@ -4,0 +6,0 @@ hd.init('US');

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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