/** * Daily quiet-hours window. Use to gate any user-facing message channel * (cron broadcasts, reactive ad delivery, on-demand replies) so the bot * doesn't ping users at 3am. * * Times are HH:MM in 24-hour clock. The window can wrap midnight * (e.g. start='22:00', end='06:00' = quiet from 10pm through 6am). * * const qh = new QuietHours({ start: '22:00', end: '06:00', timezone: 'America/Sao_Paulo' }) * if (qh.isQuiet()) return // skip this send * * `timezone` accepts any IANA name. Defaults to 'UTC'. Implementation uses * Intl.DateTimeFormat (built into the Workers runtime, no deps). */ export interface QuietHoursOptions { /** Start of the quiet window, "HH:MM" (24h). */ start: string; /** End of the quiet window, "HH:MM" (24h). Equal to `start` ⇒ never quiet. */ end: string; /** IANA timezone, e.g. "America/Sao_Paulo". Defaults to "UTC". */ timezone?: string; } export declare class QuietHours { readonly startMin: number; readonly endMin: number; readonly timezone: string; constructor({ start, end, timezone }: QuietHoursOptions); /** * @param now optional reference time (defaults to `new Date()`). * @returns true if `now` falls inside the quiet window. */ isQuiet(now?: Date): boolean; /** Sugar — convenient for `if (await guard.silent(...))` patterns. */ isActive(now?: Date): boolean; } //# sourceMappingURL=quiet_hours.d.ts.map