@fineanmol/public-holidays 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +11 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @fineanmol/public-holidays
2
2
 
3
- Small, **zero-runtime-dependency** lookups for **public holidays** bundled as versioned data. Use it in Node or any bundler that supports ES modules.
3
+ Public holiday lookups for Germany (Berlin) and India, with no runtime dependencies. Works in Node and any bundler that handles ES modules.
4
4
 
5
- **Pairs well with** [`@fineanmol/holiday-optimizer`](https://www.npmjs.com/package/@fineanmol/holiday-optimizer) for PTO planning.
5
+ Also pairs with [`@fineanmol/holiday-optimizer`](https://www.npmjs.com/package/@fineanmol/holiday-optimizer) if you want the full PTO planning tool.
6
6
 
7
7
  ## Install
8
8
 
@@ -33,13 +33,13 @@ import {
33
33
  } from "@fineanmol/public-holidays";
34
34
  ```
35
35
 
36
- - **`listRegions()`** — `{ id, name }[]`
37
- - **`holidaysInYear(regionId, year)`** — `{ date: 'YYYY-MM-DD', name }[]`
38
- - **`isHoliday(date, regionId)`** — `boolean` (`date`: `Date` or ISO `YYYY-MM-DD`)
39
- - **`holidayOn(date, regionId)`** — holiday object or `null`
40
- - **`nextHoliday(fromDate, regionId)`** — first holiday **on or after** `fromDate`, or `null`
41
- - **`previousHoliday(fromDate, regionId)`** — last holiday **on or before** `fromDate`, or `null`
42
- - **`toISODate(date)`** — normalize to `YYYY-MM-DD` (local calendar day for `Date`)
36
+ - **`listRegions()`** — returns `{ id, name }[]` for all supported regions
37
+ - **`holidaysInYear(regionId, year)`** — all holidays for that region/year as `{ date, name }[]`
38
+ - **`isHoliday(date, regionId)`** — `true`/`false`; `date` can be a `Date` or `'YYYY-MM-DD'` string
39
+ - **`holidayOn(date, regionId)`** — the holiday object if that day is one, otherwise `null`
40
+ - **`nextHoliday(fromDate, regionId)`** — next holiday on or after that date
41
+ - **`previousHoliday(fromDate, regionId)`** — last holiday on or before that date
42
+ - **`toISODate(date)`** — converts a `Date` to `'YYYY-MM-DD'` using the local calendar day
43
43
 
44
44
  ## Example
45
45
 
@@ -56,9 +56,9 @@ nextHoliday("2026-10-02", "germany-berlin");
56
56
  // → { date: '2026-10-03', name: 'Tag der Deutschen Einheit' }
57
57
  ```
58
58
 
59
- ## Disclaimer
59
+ ## Note
60
60
 
61
- Holiday rules change. This package is for **apps and planning**, not legal or payroll advice. Verify official sources for compliance.
61
+ Holiday rules change year to year. This is good for apps and scheduling don't rely on it for payroll or compliance without checking official sources.
62
62
 
63
63
  ## License
64
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fineanmol/public-holidays",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Zero-dependency public holiday lookups (Germany Berlin, India, …) with versioned yearly data.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",