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

holidays-cs

Package Overview
Dependencies
Maintainers
0
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 2.0.3 to 2.0.4

10

package.json
{
"name": "holidays-cs",
"version": "2.0.3",
"version": "2.0.4",
"author": "Roman Ožana <roman@ozana.cz> (https://ozana.cz)",

@@ -42,7 +42,7 @@ "repository": "OzzyCzech/holidays-cs",

"@types/luxon": "^3.4.2",
"@types/node": "^20.14.2",
"@types/node": "^20.14.9",
"ava": "^6.1.2",
"np": "^10.0.5",
"tsx": "^4.12.0",
"typescript": "^5.4.5",
"np": "^10.0.6",
"tsx": "^4.15.7",
"typescript": "^5.5.2",
"xo": "^0.58.0"

@@ -49,0 +49,0 @@ },

@@ -161,2 +161,49 @@ # Holidays (cs)

## Get day metadata
You can get metadata for a given date:
```javascript
import {DateTime} from 'luxon';
import {getDayMeta} from 'holidays-cs';
const meta = getDayMeta(DateTime.fromISO('2024-05-15'));
meta.isPublicHoliday; // false ...
```
The metadata object looks like this:
```typescript
export type SignificantDay = {
name: string;
description: string;
year?: number;
};
export type EasterMetadata = {
name: string | undefined;
isGoodFriday: boolean;
isHolySaturday: boolean;
ieEasterSunday: boolean;
isEasterMonday: boolean;
};
export type DayMetadata = {
// Significant days metadata
isSignificantDay: boolean;
significantDay?: SignificantDay;
// Public holidays metadata
isPublicHoliday: boolean;
publicHoliday?: string | undefined;
// Easter metadata
isHolyWeek: boolean;
easter?: EasterMetadata | undefined;
// Shops metadata
shops: {areOpen: boolean; status: string};
};
```
## Credits

@@ -168,2 +215,2 @@

MIT
[MIT](./LICENSE)
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