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

holidays-cs

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

holidays-cs - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

dist/get-meta.d.ts

27

dist/index.d.ts

@@ -8,27 +8,2 @@ export * from "./easter.js";

export * from "./shops.js";
import { DateTime } from "luxon";
interface Easter {
name: string | undefined;
isGoodFriday: boolean;
isHolySaturday: boolean;
ieEasterSunday: boolean;
isEasterMonday: boolean;
}
interface ShopsStatus {
areOpen: boolean;
status: string;
}
interface DayMetadata {
names: string[];
isSignificantDay: boolean;
significantDay: string | undefined;
isPublicHoliday: boolean;
publicHoliday: string | undefined;
easter: Easter | undefined;
shops: ShopsStatus;
}
/**
* Get metadata for a specific day
* @param date
*/
export declare function getDayMeta(date: DateTime | Date): DayMetadata;
export * from "./get-meta.js";

@@ -17,3 +17,2 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getDayMeta = void 0;
__exportStar(require("./easter.js"), exports);

@@ -26,42 +25,2 @@ __exportStar(require("./holidays.js"), exports);

__exportStar(require("./shops.js"), exports);
const luxon_1 = require("luxon");
const names_js_1 = require("./names.js");
const holidays_js_1 = require("./holidays.js");
const significant_js_1 = require("./significant.js");
const shops_js_1 = require("./shops.js");
const easter_js_1 = require("./easter.js");
/**
* Get metadata for a specific day
* @param date
*/
function getDayMeta(date) {
date = date instanceof Date ? luxon_1.DateTime.fromJSDate(date) : date;
let easter = undefined;
if ((0, easter_js_1.isHolyWeek)(date)) {
easter = {
name: (0, easter_js_1.getEasterDayName)(date),
isGoodFriday: (0, easter_js_1.isGoodFriday)(date),
isHolySaturday: (0, easter_js_1.isHolySaturday)(date),
ieEasterSunday: (0, easter_js_1.isEasterSunday)(date),
isEasterMonday: (0, easter_js_1.isEasterMonday)(date),
};
}
let shops = {
areOpen: (0, shops_js_1.areShopsOpen)(date),
status: (0, shops_js_1.getShopsStatus)(date)
};
return {
names: (0, names_js_1.getNameDayArray)(date),
// easter metadata
easter: easter,
// national significant days
isSignificantDay: (0, significant_js_1.isSignificantDay)(date),
significantDay: (0, significant_js_1.getSignificantDay)(date),
// national holidays
isPublicHoliday: (0, holidays_js_1.isPublicHoliday)(date),
publicHoliday: (0, holidays_js_1.getPublicHoliday)(date),
// shops metadata
shops: shops
};
}
exports.getDayMeta = getDayMeta;
__exportStar(require("./get-meta.js"), exports);

@@ -43,3 +43,3 @@ {

},
"version": "0.0.3"
"version": "0.0.4"
}
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