From d2be9a634fd6fc5f5ba2109dfdb9dfb182af22ca Mon Sep 17 00:00:00 2001 From: pku-xht Date: Thu, 6 Aug 2026 22:32:01 +0800 Subject: [PATCH] docs(schedule): document recurring gate exhaustion --- packages/schedule/tool-schedule/src/domain.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/schedule/tool-schedule/src/domain.ts b/packages/schedule/tool-schedule/src/domain.ts index a36dd6a220..31b2f6372e 100644 --- a/packages/schedule/tool-schedule/src/domain.ts +++ b/packages/schedule/tool-schedule/src/domain.ts @@ -38,7 +38,11 @@ const LOCAL_TIME = /^(?\d{2}):(?\d{2}):(?\d{2})(?:\.(?[+-])(?\d{2}):(?\d{2})(?::(?\d{2}))?)?$/ -/** Whether the durable recurring gate has no four-digit-year admission left. */ +/** + * Whether the durable recurring gate has no four-digit-year admission left. + * @param lastAcceptedAt - Latest accepted recurring batch, when any. + * @returns `true` only when another compliant batch time is unrepresentable. + */ export function isRecurringGateExhausted(lastAcceptedAt: string | undefined): boolean { return lastAcceptedAt !== undefined && Date.parse(lastAcceptedAt) + MIN_RECURRING_INTERVAL_SECONDS * 1_000 > MAX_FOUR_DIGIT_YEAR_MS