Component evidence

Send Later Scheduler (lib/schedule.js)

everything · src/teamchat/src/lib/schedule.js · javascript · MIT
chatautomationtag:timezonetag:presetstag:datetime

Computes local-time presets and wording for 'send later' and 'remind me' features in team chat. Reuse for scheduling UI with timezone-safe day stepping.

Source preview first 800 characters · full source over MCP
// Source: https://github.com/HeyPuter/everything | License: MIT | Copyright 2026 Puter Technologies Inc
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Times for "send later" and "remind me": presets in the user's local zone,
 * and the wording that never promises a second. Delivery happens at the
 * first sync poll after the time by anyone with the workspace open, so the
 * app says "around 9:00" and explains what that depends on.
 */

const HOUR = 3600_000;

/**
 * `hour:minute` on the calendar day `days` after `base`'s, in the local zone.
 * Days are stepped on the calendar, not by 24 hours: the night the clocks
 * change has 23 or 25, and 24 hours from just after midnight (or just
 * before) lands on the wrong date.
 */
function at(base, hour, minute = 0, days 

... (truncated -- full source via MCP)