bizdays-toolkit 0.22.0 → 0.22.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/CHANGELOG.md +13 -1
- package/README.md +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.22.1] - 2026-10-27
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- 祝日の識別子(`key`)の付け方の説明を、同梱の提供元に実際に付いている `key` と合わせた(公開物の動作・`key` は変わらない)。冠詞は先頭の "The" だけを除き、途中の冠詞は残す(`respect-for-the-aged`・`battle-of-the-boyne`)。例外は `new-year`・`boxing-day`・`labour-day`・`national-day` の 4 つ。規則は `docs/providers.md`(英日)にだけ書き、ガイド(英日)はそこを指す形にした(ガイド・`docs/providers.md`・決定の文書が、それぞれ別の不正確な規則を書いていた)
|
|
12
|
+
- README(英日)・ガイド(英日)の `onHolidayRule: "after-holiday"` の説明を「翌平日」「next weekday」から「次の祝日でない日(土曜日のこともある)」に改め、言葉どおりの翌平日は `skipWeekdays` で書けることを示した(振替先は decisions.md の 14 番のとおり「祝日でない日」で、金曜日の規則は金曜日が祝日のたびに土曜日に振り替わる。動作は変わらない)
|
|
13
|
+
- ガイド(英日)の「未確定の祝日」で、祝日の翌日・祝前日の規則が見る日を「隣の日」から「隣の日(`skipWeekdays` があれば塊の全体)」に改めた(実装どおり)
|
|
14
|
+
- ガイド(英日)の作成時間の具体値(開発用の機械での測定値)を「1 ミリ秒を大きく下回る」に改めた(機械に依存する値は照合できないため)
|
|
15
|
+
- `docs/migration.md`: 0.22.0 の `cycle`・祝前日の規則への書き換えに、判定の段階が変わる注意(`holidayPolicy: "open"` なら `onHolidayRule: "over-holiday"` を付ける、`openRecurring` の規則と重なる日は営業日になる、書き換えの前後で `daysBetween` を比べる)を足した
|
|
16
|
+
- `docs/decisions.md`: 46 番の `key` の付け方の規則を、自身の例(`respect-for-the-aged`)と矛盾しない形に改めた(「冠詞」→「先頭の冠詞」、例外を 4 つに整理)。14 番に、土曜日への振替が「年に 0〜1 回」なのは月曜日の規則の場合だけであることを追記した
|
|
17
|
+
|
|
7
18
|
## [0.22.0] - 2026-10-27
|
|
8
19
|
|
|
9
20
|
### Added
|
|
@@ -640,7 +651,8 @@
|
|
|
640
651
|
|
|
641
652
|
- 日本: 2026 年 2 月の官報(2027 年の春分・秋分の日)まで反映(`dataVersion: "2026-02"`、`confirmedThrough: 2027`)
|
|
642
653
|
|
|
643
|
-
[Unreleased]: https://github.com/inohan77/bizdays-toolkit/compare/v0.22.
|
|
654
|
+
[Unreleased]: https://github.com/inohan77/bizdays-toolkit/compare/v0.22.1...HEAD
|
|
655
|
+
[0.22.1]: https://github.com/inohan77/bizdays-toolkit/compare/v0.22.0...v0.22.1
|
|
644
656
|
[0.22.0]: https://github.com/inohan77/bizdays-toolkit/compare/v0.21.4...v0.22.0
|
|
645
657
|
[0.21.4]: https://github.com/inohan77/bizdays-toolkit/compare/v0.21.3...v0.21.4
|
|
646
658
|
[0.21.3]: https://github.com/inohan77/bizdays-toolkit/compare/v0.21.2...v0.21.3
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ A business-day calendar that combines public holidays with company or store clos
|
|
|
21
21
|
|
|
22
22
|
- **Holidays verified day by day against official data**: Japan (Cabinet Office, 1955 to the latest year in the Official Gazette), the UK (GOV.UK; for 1974–2011 the Royal Proclamations in The Gazette, and from 2000 the government lists of the time; England, Wales, Scotland and Northern Ireland), France (data.gouv.fr; metropolitan France and Alsace-Moselle, verified for 2006–2031) and Singapore (Ministry of Manpower on data.gov.sg, 2020 onwards). Every date is checked in the tests, differences are watched daily and shipped as patch versions
|
|
23
23
|
- **Business-day arithmetic**: closed weekdays, annual closures (across the new year too), specific closed and open dates and holidays combine into "N business days later", "next business day after the cutoff" and month-based due dates with the four adjustment conventions used in finance
|
|
24
|
-
- **Recurring rules**: "closed on the 3rd Wednesday", "every other Wednesday", "stocktaking on the last day of the month", "closed on Mondays,
|
|
24
|
+
- **Recurring rules**: "closed on the 3rd Wednesday", "every other Wednesday", "stocktaking on the last day of the month", "closed on Mondays, moved to the next non-holiday when Monday is a holiday", "the day after (or before) a holiday", "the last weekday before a bank holiday", shift cycles such as four days on and two days off, each with its own behaviour on holidays and an optional effective period
|
|
25
25
|
- **Day-by-day values and combined calendars**: store hours that change by weekday, holiday and date; a business-day calendar made from such a schedule; and the days on which all (or any) of several calendars are open
|
|
26
26
|
- **Option diagnostics**: `bizdays-toolkit/diagnose` lists rules that never apply, rules that are shadowed or redundant, rules that have ended, typos in option names and options with no business day at all, without throwing. One line in a test keeps options honest
|
|
27
27
|
- **Lightweight, zero dependencies, time-zone safe**: about 11.5 KB min+gzip (about 13.2 KB with Japanese holidays, about 13.6 KB with UK bank holidays, about 12.4 KB with French holidays, about 12.4 KB with Singapore holidays; measured for 0.22.0). Standard JavaScript and `Intl` only, ESM with bundled types; tested on Node.js, Chrome, Firefox, Edge, Safari, Cloudflare Workers, Bun and Deno. Instants such as `Date` are converted to a civil date in the calendar's time zone before evaluation
|
|
@@ -84,7 +84,7 @@ A calendar is built from the holiday provider and your closures: `closedWeekdays
|
|
|
84
84
|
| `{ businessDayOfMonth: -1 }`, `{ businessDayOfMonth: 5 }` | The last business day of the month, the 5th business day |
|
|
85
85
|
| `{ holiday: true, kinds: ["substitute"] }` | Holidays, optionally narrowed by kind or by key (`keys: ["vernal-equinox"]`) |
|
|
86
86
|
| `{ dayAfterHoliday: true }`, `{ dayBeforeHoliday: true }` | The day after (or before) a holiday or a run of holidays |
|
|
87
|
-
| `onHolidayRule: "after-holiday"` | "Closed on Mondays, or the next
|
|
87
|
+
| `onHolidayRule: "after-holiday"` | "Closed on Mondays, or the next non-holiday if a holiday" (can be a Saturday) |
|
|
88
88
|
| `skipWeekdays: [0, 6]` | With `"after-holiday"`: also skip weekends ("June 15, or the next business day") |
|
|
89
89
|
| `effectiveFrom`, `effectiveTo` | The period the rule is in effect |
|
|
90
90
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bizdays-toolkit",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.1",
|
|
4
4
|
"description": "Holidays, business-day calendar and day-by-day schedules (e.g. store hours) with time zone support. Japanese holidays verified against the Cabinet Office data; UK bank holidays (England, Wales, Scotland, Northern Ireland) verified against GOV.UK and The Gazette; French public holidays (metropole, Alsace-Moselle) verified against data.gouv.fr; Singapore public holidays verified against data.gov.sg. / 祝日と営業日のカレンダー(タイムゾーン対応・日本の祝日は内閣府、英国の bank holidays は GOV.UK と The Gazette、フランスの祝日は data.gouv.fr、シンガポールの祝日は data.gov.sg のデータで全日照合)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bank-holidays",
|