date-holidays 3.40.1 → 4.0.1
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.
- package/README.md +17 -6
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.LICENSE.txt +0 -18
- package/dist/index.min.js.map +1 -1
- package/dist/umd.min.js +1 -1
- package/dist/umd.min.js.LICENSE.txt +0 -18
- package/dist/umd.min.js.map +1 -1
- package/lib/Holidays.cjs +40 -7
- package/lib/index.cjs +15 -2
- package/package.json +23 -11
- package/scripts/holidays2json.js +238 -0
- package/src/Holidays.js +39 -6
- package/src/browser.js +9 -0
- package/src/index.js +9 -1
- package/src/plugins.js +1 -0
- package/types/index.d.ts +4 -0
- package/scripts/holidays2json.cjs +0 -197
package/README.md
CHANGED
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
[](https://github.com/commenthol/date-holidays/actions/workflows/ci.yml)
|
|
7
7
|
[](https://github.com/GeiserX/awesome-europe#readme)
|
|
8
8
|
|
|
9
|
+
> **Note:** Version 4 uses [`Temporal`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal),
|
|
10
|
+
> for browser bundles, which is supported by Chrome, Edge and Firefox but not yet by Safari.
|
|
11
|
+
> For Safari, load a Temporal polyfill (e.g. [`temporal-polyfill`](https://www.npmjs.com/package/temporal-polyfill))
|
|
12
|
+
> before the bundle.
|
|
13
|
+
|
|
14
|
+
|
|
9
15
|
This module provides dates of holidays for various countries, states and regions
|
|
10
16
|
by type while considering the applicable timezone.
|
|
11
17
|
|
|
@@ -848,7 +854,7 @@ Alternatively you may use the `--omit` option.
|
|
|
848
854
|
Manually use
|
|
849
855
|
|
|
850
856
|
```bash
|
|
851
|
-
./scripts/holidays2json --pick US,CA,MX
|
|
857
|
+
node ./scripts/holidays2json.js --pick US,CA,MX
|
|
852
858
|
```
|
|
853
859
|
|
|
854
860
|
> **NOTE:** There are some countries which depend on data of others which
|
|
@@ -880,14 +886,19 @@ Please take a look at `./webpack.config.js`. To further reduce size consider cus
|
|
|
880
886
|
|
|
881
887
|
## Browser
|
|
882
888
|
|
|
883
|
-
This project also runs in all modern browsers. See `./examples/browser`
|
|
889
|
+
This project also runs in all modern browsers. See `./examples/browser`. The browser export uses the Temporal timezone adapter, so browsers must support `Temporal` or load a polyfill before the bundle.
|
|
890
|
+
|
|
891
|
+
> **Note:** Version 4 uses [`Temporal`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal),
|
|
892
|
+
> for browser bundles, which is supported by Chrome, Edge and Firefox but not yet by Safari.
|
|
893
|
+
> For Safari, load a Temporal polyfill (e.g. [`temporal-polyfill`](https://www.npmjs.com/package/temporal-polyfill))
|
|
894
|
+
> before the bundle.
|
|
884
895
|
|
|
885
896
|
| Browser | Version |
|
|
886
897
|
| ------- | :-----: |
|
|
887
|
-
| Chrome | >=
|
|
888
|
-
| Firefox | >=
|
|
889
|
-
| Safari |
|
|
890
|
-
| Edge | >=
|
|
898
|
+
| Chrome | >=144 |
|
|
899
|
+
| Firefox | >=139 |
|
|
900
|
+
| Safari | polyfill required |
|
|
901
|
+
| Edge | >=144 |
|
|
891
902
|
|
|
892
903
|
Please do not forget to set the correct charset!
|
|
893
904
|
|