bizdays-toolkit 0.31.7 → 0.31.9
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 +29 -1
- package/README.md +2 -2
- package/dist/core/date.d.ts +4 -4
- package/dist/core/date.js +6 -1
- package/dist/core/diagnose.js +32 -7
- package/dist/core/errors.d.ts +9 -2
- package/dist/core/input.js +1 -1
- package/dist/core/migrate.js +2 -2
- package/dist/core/schedule.d.ts +5 -1
- package/dist/core/schedule.js +2 -1
- package/dist/core/types.d.ts +3 -2
- package/dist/fr/rules.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,32 @@ Entries from 0.31.0 are in English. Earlier entries remain in Japanese (their **
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.31.9] - 2026-11-14
|
|
10
|
+
|
|
11
|
+
This version removes two wrong diagnostics, makes evaluation and the option diagnostics faster, and documents how time zone names are compared. Results of calendars and schedules do not change.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- The option diagnostics reported `never-matches` (a warning) for a recurring rule that does match, when its effective period is open on one side and the 28 years scanned from the other end reach a year divisible by 100 but not by 400 (such as 1900 or 2100). For example, `{ weekday: 1, nth: 5, months: [2], effectiveFrom: "2073-01-01" }` first matches on 2112-02-29, and removing the rule as the warning suggested changed that day. Such a period is now scanned for 56 years, which contain every combination of weekday and date, and `redundant` is decided over the same range. The guide and the design decisions (31) described this as a limit in 0.31.7 and now describe the new range; rules with `interval` or `cycle` remain an approximation across such a year. Only the wrong warning disappears (a wrong diagnostic may disappear in a patch version; design decisions 33)
|
|
16
|
+
- `diagnoseSchedule` returned a second `error`, a `time-zone-conflict` at the `calendar` of an nth-business-day rule, when the time zone of the schedule itself could not be determined (an invalid `timeZone`, or holiday providers with different time zones and no `timeZone`). It compared the calendar with a placeholder that the options do not mention (`"UTC"`, or the time zone of the first provider). It now returns only the error at `timeZone`, the one that `createSchedule` throws (design decisions 30). A conflict with a valid `timeZone` is reported as before
|
|
17
|
+
- Documentation: the guide, the type descriptions of `HolidayLookup.timeZone` and of `time-zone-conflict` in `KnownErrorCode`, and the design decisions (18) now say that `timeZone` returns the name the runtime's `Intl` reports, which can differ from the spelling in the options and from one runtime to another, and that time zones are compared by that name. Aliases of one time zone (such as `"UTC"` and `"Etc/UTC"`, or `"Asia/Kolkata"` and `"Asia/Calcutta"`) are therefore accepted on Node.js but are a `time-zone-conflict` on a runtime that does not turn aliases into one name (confirmed on Bun 1.4.3 and Safari 27.2). Results are unchanged. Write the same spelling wherever time zones must match; which time zones count as the same will be defined in the next minor version
|
|
18
|
+
- Documentation: the design decisions said that a mistyped option is a type error in TypeScript (8). That holds only for options written as an object literal: passing a holiday provider or a calendar itself as the options (`createCalendar(jp)`) compiles and makes a calendar without holidays, and the diagnostics report `unknown-option`. The design decisions also said that the supported years do not matter to the diagnostics (17) and that effective periods outside the scanned range are scanned (31); with `outOfRangePolicy: "throw"` only the supported years are scanned, as the guide said. The design decisions (18) now give the reasons why `combineCalendars` throws for fewer than two calendars and for the same calendar twice, and the guide says to remove duplicates before handling the case of one calendar. The bundle sizes in the README were measured again for 0.31.9
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Evaluating a day and the option diagnostics are faster. The date string of the day was parsed again by every step of the evaluation and by every rule; the last parsed date is now remembered. The parsed result depends only on the string, so results are unchanged (design decisions 16)
|
|
23
|
+
|
|
24
|
+
## [0.31.8] - 2026-11-13
|
|
25
|
+
|
|
26
|
+
This version fixes one input that was silently accepted and corrects type descriptions and documents. Results of calls that were written correctly do not change.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- A Temporal-like date-time whose `hour` was `null`, a string or another value that is not a number (such as `{ year: 2026, month: 12, day: 28, hour: "15", minute: 30 }`) was read as a date without a time, so `civilOf` returned `time: null` and a check such as `open <= time` was silently false. It now throws `invalid-time`, as `minute: null` does since 0.31.7 (design decisions 6). A Temporal-like value with `minute` but without `hour` is still read as a date. If you build the value from a form or a database, convert `hour` to a number first
|
|
31
|
+
- Type descriptions: `KnownErrorCode` now says that `no-business-day` also covers an nth business day that the month does not have and a calendar's closing month without its own period, and that `time-zone-conflict` also covers calendars combined with `combineCalendars` and the basis calendar of a schedule's nth-business-day rule (where the fix is to make them with the same time zone, not to set `timeZone`). `HolidayProvider` now describes long runs of holidays as below
|
|
32
|
+
- Documentation: the provider guide, the description of `HolidayProvider` and the design decisions (24) said that within a run of holidays longer than 31 days, rules for the day before or after a holiday do not match and `"after-holiday"` rules are not moved. In fact rules for the day before or after a holiday match the day before and the day after a run of any length, and an `"after-holiday"` rule is not moved only when its own day is more than 31 days before the first day after the run. The documents now say so; results are unchanged
|
|
33
|
+
- Documentation: the guide listed 2008 and 2059 as the years when two French holidays fall on the same day; Ascension Day also falls on May 8 in 2070, 2081 and 2092. The English README said that years after a provider's supported range are an error; years before it are too. The provider guide said that the four exceptional keys keep a word the rule would drop; `new-year` drops the possessive "s" as well. The design decisions (1, 3, 9) now list every case of `out-of-range`, describe `invalid-input` as a value in none of the accepted forms, and describe the functions that fix an argument of another by what they are rather than by name. Results are unchanged
|
|
34
|
+
|
|
9
35
|
## [0.31.7] - 2026-11-12
|
|
10
36
|
|
|
11
37
|
This version makes three kinds of options that were silently accepted throw, as the design decisions (6, 8) promise, gives a code to the remaining exceptions without one, and corrects documents. Options that were written correctly give the same results as before. Options that write both a single date and a range in one entry, write `null` in one of seven options, or have a hole in an array now throw; each item below says how to rewrite them.
|
|
@@ -948,7 +974,9 @@ This version rebuilds the `redundant` diagnostic so that the reported rules can
|
|
|
948
974
|
|
|
949
975
|
- 日本: 2026 年 2 月の官報(2027 年の春分・秋分の日)まで反映(`dataVersion: "2026-02"`、`confirmedThrough: 2027`)
|
|
950
976
|
|
|
951
|
-
[Unreleased]: https://github.com/inohan77/bizdays-toolkit/compare/v0.31.
|
|
977
|
+
[Unreleased]: https://github.com/inohan77/bizdays-toolkit/compare/v0.31.9...HEAD
|
|
978
|
+
[0.31.9]: https://github.com/inohan77/bizdays-toolkit/compare/v0.31.8...v0.31.9
|
|
979
|
+
[0.31.8]: https://github.com/inohan77/bizdays-toolkit/compare/v0.31.7...v0.31.8
|
|
952
980
|
[0.31.7]: https://github.com/inohan77/bizdays-toolkit/compare/v0.31.6...v0.31.7
|
|
953
981
|
[0.31.6]: https://github.com/inohan77/bizdays-toolkit/compare/v0.31.5...v0.31.6
|
|
954
982
|
[0.31.5]: https://github.com/inohan77/bizdays-toolkit/compare/v0.31.4...v0.31.5
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ A business-day calendar that combines public holidays with company or store clos
|
|
|
23
23
|
- **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
|
|
24
24
|
- **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
|
|
25
25
|
- **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
|
|
26
|
-
- **Lightweight, zero dependencies, time-zone safe**: about 14.
|
|
26
|
+
- **Lightweight, zero dependencies, time-zone safe**: about 14.2 KB min+gzip (about 15.9 KB with Japanese holidays, about 16.4 KB with UK bank holidays, about 15.1 KB with French holidays, about 15.1 KB with Singapore holidays; measured for 0.31.9). 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
|
|
27
27
|
- **Extensible to other countries and regions**: holiday providers are pluggable through the `HolidayProvider` interface, and `bizdays-toolkit/provider` exposes the calendar arithmetic (nth weekday of a month, Easter, substitute days for holidays on a weekend) that most countries' holidays are built from
|
|
28
28
|
|
|
29
29
|
## Installation
|
|
@@ -68,7 +68,7 @@ The [guide](https://github.com/inohan77/bizdays-toolkit/blob/main/docs/guide.md)
|
|
|
68
68
|
| `metropole`, `alsaceMoselle` | `bizdays-toolkit/fr` | `Europe/Paris` | 2000–2099 | data.gouv.fr "Jours fériés en France" |
|
|
69
69
|
| `sg` | `bizdays-toolkit/sg` | `Asia/Singapore` | 2020–2027 | data.gov.sg (Ministry of Manpower) |
|
|
70
70
|
|
|
71
|
-
Each holiday carries its date, name (and English name), `kind` (such as `regular`, `substitute` and `special`; the values differ by country) and `confirmed` (whether the date is officially fixed; the Japanese equinox days and UK bank holidays after the last published year are predictions). Years
|
|
71
|
+
Each holiday carries its date, name (and English name), `kind` (such as `regular`, `substitute` and `special`; the values differ by country) and `confirmed` (whether the date is officially fixed; the Japanese equinox days and UK bank holidays after the last published year are predictions). Years outside the supported range are an error unless `outOfRangePolicy: "ignore"` is set, and `unconfirmedHolidayPolicy: "throw"` stops any result that would depend on a predicted holiday. Details: [Bundled holiday providers](https://github.com/inohan77/bizdays-toolkit/blob/main/docs/guide.md#bundled-holiday-providers), [Unconfirmed holidays](https://github.com/inohan77/bizdays-toolkit/blob/main/docs/guide.md#unconfirmed-holidays).
|
|
72
72
|
|
|
73
73
|
### Business-day calendars and recurring rules
|
|
74
74
|
|
package/dist/core/date.d.ts
CHANGED
|
@@ -14,11 +14,11 @@ export type DateString = string;
|
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
16
|
export type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
17
|
-
/** 年月日に分解する。形式または暦として不正なら RangeError */
|
|
17
|
+
/** 年月日に分解する。形式または暦として不正なら RangeError。返すオブジェクトは変更できない */
|
|
18
18
|
export declare function parseDate(value: string): {
|
|
19
|
-
year: number;
|
|
20
|
-
month: number;
|
|
21
|
-
day: number;
|
|
19
|
+
readonly year: number;
|
|
20
|
+
readonly month: number;
|
|
21
|
+
readonly day: number;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* "YYYY-MM-DD" として正しい暦日か。
|
package/dist/core/date.js
CHANGED
|
@@ -2,7 +2,11 @@ import { describeValue, rangeError } from "./errors.js";
|
|
|
2
2
|
const DATE_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
3
3
|
const MS_PER_DAY = 86_400_000;
|
|
4
4
|
const MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
5
|
+
let lastValue = "2000-01-01";
|
|
6
|
+
let lastParts = Object.freeze({ year: 2000, month: 1, day: 1 });
|
|
5
7
|
export function parseDate(value) {
|
|
8
|
+
if (value === lastValue)
|
|
9
|
+
return lastParts;
|
|
6
10
|
const m = typeof value === "string" ? DATE_RE.exec(value) : null;
|
|
7
11
|
if (!m) {
|
|
8
12
|
throw rangeError("invalid-date", `Invalid date string: ${describeValue(value)} (expected YYYY-MM-DD)`);
|
|
@@ -13,7 +17,8 @@ export function parseDate(value) {
|
|
|
13
17
|
if (year < 1000 || month < 1 || month > 12 || day < 1 || day > lengthOfMonth(year, month)) {
|
|
14
18
|
throw rangeError("invalid-date", `Invalid date: ${describeValue(value)}`);
|
|
15
19
|
}
|
|
16
|
-
|
|
20
|
+
lastValue = value;
|
|
21
|
+
return (lastParts = Object.freeze({ year, month, day }));
|
|
17
22
|
}
|
|
18
23
|
export function isValidDate(input) {
|
|
19
24
|
if (typeof input !== "string")
|
package/dist/core/diagnose.js
CHANGED
|
@@ -53,6 +53,28 @@ const MAX_WINDOW_YEARS = 200;
|
|
|
53
53
|
const MAX_DATE_RULE_DAYS = 366 * MAX_WINDOW_YEARS;
|
|
54
54
|
const atCalendarEdge = (n, error) => (n < MIN_DAY + MAX_HOLIDAY_RUN || n > MAX_DAY - MAX_HOLIDAY_RUN) &&
|
|
55
55
|
error?.code === "out-of-range";
|
|
56
|
+
function openEndedDays(from, days) {
|
|
57
|
+
const lo = Math.max(from, MIN_DAY);
|
|
58
|
+
const hi = Math.min(from + days - 1, MAX_DAY);
|
|
59
|
+
if (lo > hi)
|
|
60
|
+
return days;
|
|
61
|
+
const last = yearOf(hi);
|
|
62
|
+
for (let y = Math.ceil(yearOf(lo) / 100) * 100; y <= last; y += 100)
|
|
63
|
+
if (y % 400 !== 0)
|
|
64
|
+
return Math.max(days, 2 * PATTERN_DAYS);
|
|
65
|
+
return days;
|
|
66
|
+
}
|
|
67
|
+
function periodSpan(rule, cycle) {
|
|
68
|
+
const { effectiveFrom, effectiveTo } = rule;
|
|
69
|
+
if (effectiveFrom === null) {
|
|
70
|
+
const to = effectiveTo;
|
|
71
|
+
return { from: to - openEndedDays(to - cycle + 1, cycle) + 1, to };
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
from: effectiveFrom,
|
|
75
|
+
to: effectiveTo ?? effectiveFrom + openEndedDays(effectiveFrom, cycle) - 1,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
56
78
|
const gcd = (a, b) => (b === 0 ? a : gcd(b, a % b));
|
|
57
79
|
const lcm = (a, b) => (a / gcd(a, b)) * b;
|
|
58
80
|
function patternCycle(rules) {
|
|
@@ -102,9 +124,9 @@ function scanWindow(source, rules, cycle) {
|
|
|
102
124
|
for (const rule of rules) {
|
|
103
125
|
if (rule.effectiveFrom === null && rule.effectiveTo === null)
|
|
104
126
|
continue;
|
|
105
|
-
const
|
|
106
|
-
const to = Math.min(
|
|
107
|
-
ranges.push({ from: Math.max(from, MIN_DAY), to: Math.min(to, MAX_DAY) });
|
|
127
|
+
const span = periodSpan(rule, cycle);
|
|
128
|
+
const to = Math.min(span.to, span.from + 366 * MAX_WINDOW_YEARS - 1);
|
|
129
|
+
ranges.push({ from: Math.max(span.from, MIN_DAY), to: Math.min(to, MAX_DAY) });
|
|
108
130
|
}
|
|
109
131
|
}
|
|
110
132
|
ranges.sort((a, b) => a.from - b.from);
|
|
@@ -140,10 +162,13 @@ function patternBits(rule) {
|
|
|
140
162
|
return bits;
|
|
141
163
|
}
|
|
142
164
|
function matchesAnyDay(rule, cycle) {
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
165
|
+
const span = rule.effectiveFrom === null && rule.effectiveTo === null
|
|
166
|
+
? { from: PATTERN_FROM, to: PATTERN_FROM + cycle - 1 }
|
|
167
|
+
: periodSpan(rule, cycle);
|
|
168
|
+
const to = rule.effectiveFrom !== null && rule.effectiveTo !== null
|
|
169
|
+
? Math.min(span.to, span.from + openEndedDays(span.from, cycle) - 1)
|
|
170
|
+
: span.to;
|
|
171
|
+
for (let n = Math.max(span.from, MIN_DAY); n <= Math.min(to, MAX_DAY); n++)
|
|
147
172
|
if (matchPattern(rule, fromDayNumber(n)))
|
|
148
173
|
return true;
|
|
149
174
|
return false;
|
package/dist/core/errors.d.ts
CHANGED
|
@@ -30,7 +30,11 @@ export type KnownErrorCode =
|
|
|
30
30
|
| "invalid-argument"
|
|
31
31
|
/** 設定の誤り。設定は営業日カレンダー・スケジュールを作る関数が検証するオブジェクトで、オブジェクトでないことも含む(decisions.md の 8 番) */
|
|
32
32
|
| "invalid-option"
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* 同じタイムゾーンでなければならないものが食い違う(1 つの設定の祝日の提供元どうしで、timeZone の指定がない。
|
|
35
|
+
* 合成するカレンダーどうし。スケジュールと、第 n 営業日の規則の数える基準のカレンダー)。実行環境の Intl が返す名前が
|
|
36
|
+
* 同じかで比べるので、別名どうし("UTC" と "Etc/UTC" など)は、別名を同じ名前に直さない実行環境では食い違いになる
|
|
37
|
+
*/
|
|
34
38
|
| "time-zone-conflict"
|
|
35
39
|
/**
|
|
36
40
|
* 対応している年の範囲の外(提供元の対応年、日付の計算や瞬間の変換が 1000〜9999 年の外に出た、祝日の一覧に渡した年が
|
|
@@ -43,7 +47,10 @@ export type KnownErrorCode =
|
|
|
43
47
|
| "invalid-provider"
|
|
44
48
|
/** 祝日の提供元が返したデータの誤り */
|
|
45
49
|
| "invalid-provider-data"
|
|
46
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* 営業日が見つからない(探索が searchDayLimit 日を超えた、月の営業日が第 n 営業日の n に足りない、カレンダーの締めの月に
|
|
52
|
+
* 固有の期間がない)
|
|
53
|
+
*/
|
|
47
54
|
| "no-business-day"
|
|
48
55
|
/** searchDayLimit の日数のうちに休業日が見つからない(nextClosedDay・previousClosedDay) */
|
|
49
56
|
| "no-closed-day";
|
package/dist/core/input.js
CHANGED
|
@@ -120,7 +120,7 @@ export function toCivil(input, timeZone) {
|
|
|
120
120
|
throw rangeError("invalid-date", `Invalid date: year must be an integer from 1000 to 9999: ${describeValue(input.year)}`);
|
|
121
121
|
}
|
|
122
122
|
const date = formatDate(input.year, input.month, input.day);
|
|
123
|
-
if (
|
|
123
|
+
if (input.hour !== undefined) {
|
|
124
124
|
return {
|
|
125
125
|
date,
|
|
126
126
|
minutes: wallTime(input.hour, input.minute === undefined ? 0 : input.minute),
|
package/dist/core/migrate.js
CHANGED
|
@@ -20,8 +20,8 @@ function clone(v) {
|
|
|
20
20
|
}
|
|
21
21
|
const join = (path, key) => (path ? `${path}.${key}` : key);
|
|
22
22
|
function onlyJp(options) {
|
|
23
|
-
const raw = options["holidayProvider"]
|
|
24
|
-
const list = raw === undefined ? [] : Array.isArray(raw) ? raw : [raw];
|
|
23
|
+
const raw = options["holidayProvider"] === undefined ? options["holidays"] : options["holidayProvider"];
|
|
24
|
+
const list = raw === undefined ? [] : Array.isArray(raw) ? Array.from(raw) : [raw];
|
|
25
25
|
return (list.length > 0 &&
|
|
26
26
|
list.every((p) => typeof p === "object" && p !== null && p.id === "JP"));
|
|
27
27
|
}
|
package/dist/core/schedule.d.ts
CHANGED
|
@@ -532,7 +532,11 @@ export interface ScheduleDayInfo<Value, Kind extends string = string> {
|
|
|
532
532
|
* @public
|
|
533
533
|
*/
|
|
534
534
|
export interface HolidayLookup<Kind extends string = string> {
|
|
535
|
-
/**
|
|
535
|
+
/**
|
|
536
|
+
* 日時の入力を暦日に変換するタイムゾーン。実行環境の Intl が返す名前で、設定に書いた綴りと違うことがあり、実行環境によっても
|
|
537
|
+
* 違う("Asia/Kolkata" と書くと、Node.js では "Asia/Calcutta"、Bun では "Asia/Kolkata")。同じタイムゾーンかは、この名前が
|
|
538
|
+
* 同じかで比べる(違えば time-zone-conflict)
|
|
539
|
+
*/
|
|
536
540
|
readonly timeZone: string;
|
|
537
541
|
/** 祝日の提供元 */
|
|
538
542
|
readonly providers: readonly HolidayProvider<Kind>[];
|
package/dist/core/schedule.js
CHANGED
|
@@ -987,8 +987,9 @@ export function compileScheduleOptions(c, options) {
|
|
|
987
987
|
const annual = compileAnnualRules(c, "annualDates", o["annualDates"], requiredValue(c), false, true);
|
|
988
988
|
const dates = compileDateRules(c, "dates", o["dates"], requiredValue(c), false, true);
|
|
989
989
|
const recurring = compileRecurringRules(c, "recurringRules", o["recurringRules"], requiredValue(c), [...RECURRING_RULE_KEYS, "value"], "schedule", writtenKey(["source", "schedule"], written, "recurringRules"), jpUsage(source));
|
|
990
|
+
const zoneKnown = !c.issues.some((i) => i.severity === "error" && i.path === "timeZone");
|
|
990
991
|
for (const rule of recurring) {
|
|
991
|
-
if (rule.businessDays === null)
|
|
992
|
+
if (rule.businessDays === null || !zoneKnown)
|
|
992
993
|
continue;
|
|
993
994
|
const entry = o["recurringRules"][Number(/\[(\d+)\]$/.exec(rule.path)[1])];
|
|
994
995
|
const tz = entry["calendar"].timeZone;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -38,8 +38,9 @@ export interface Holiday<Kind extends string = string> {
|
|
|
38
38
|
* holidaysInYear が返すデータは、年ごとに初めて使うときに検証され、誤りがあれば
|
|
39
39
|
* code: "invalid-provider-data" の例外になる。返した祝日は、契約の項目(date・name・nameEn・names・
|
|
40
40
|
* kind・confirmed・key)だけを持つ変更できないオブジェクトに複製される。
|
|
41
|
-
*
|
|
42
|
-
*
|
|
41
|
+
* 祝日が長く続くとき、"after-holiday" の規則は、本来の日が振り替わる先の日より 31 日を超えて前にあると振り替わらない
|
|
42
|
+
* (振替元をさかのぼるのは 31 日まで。祝日の前後の規則は連続の長さによらず当てはまる。長い休業は closedDates・
|
|
43
|
+
* closedAnnualDates で書く。decisions.md の 24 番)。
|
|
43
44
|
*
|
|
44
45
|
* 項目を足すときのバージョンは RELEASING.md の区分の表による。1.0.0 以降、マイナーバージョンで足す項目は省略可能なものに限る
|
|
45
46
|
* (必須にすると、自作の提供元が型エラーになるため)。
|
package/dist/fr/rules.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* - 固定日の祝日(1/1・5/1・5/8・7/14・8/15・11/1・11/11・12/25。Alsace-Moselle は 12/26 も)と、
|
|
5
5
|
* 復活祭から決まる祝日(Lundi de Pâques = +1 日、Ascension = +39 日、Lundi de Pentecôte = +50 日。
|
|
6
6
|
* Alsace-Moselle は Vendredi saint = −2 日も)を規則で計算する。振替はない
|
|
7
|
-
* - 2 つの祝日が同じ日に当たる年(復活祭が 3 月 23 日なら 5 月 1 日 = Ascension
|
|
7
|
+
* - 2 つの祝日が同じ日に当たる年(復活祭が 3 月 23 日なら 5 月 1 日 = Ascension、3 月 30 日なら 5 月 8 日 = Ascension)は、
|
|
8
8
|
* 復活祭から決まる祝日の名称・識別子で 1 件にする
|
|
9
9
|
* (data.gouv.fr の JSON と同じ扱い。提供元は 1 日に 1 件を返す契約のため)
|
|
10
10
|
* - 名称は data.gouv.fr の表記(フランス語)。nameEn はライブラリの英訳
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bizdays-toolkit",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.9",
|
|
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",
|