const start =
parseTimestamp("2026-06-08")
const next =
addToDate(start, { day: 7 })
start !== next
formatTimestamp(next)Timestamp
Immutable date, time, interval, and range helpers for JavaScript and TypeScript.
Parse, compare, and compose immutable date and time objects without binding your app to a UI framework, browser timezone surprise, or heavyweight date runtime.
Small primitives for dates that need to behave the same everywhere
Timestamp is meant to sit underneath UI components, API clients, docs examples, tests, and server-rendered apps without bringing framework assumptions along for the ride.
Date + Time Objects
Represent date-only, time-only, and date-time values with explicit fields instead of hidden mutable Date state.
Safe Date Math
Add, compare, diff, clamp, and validate values while returning fresh timestamp objects each time.
Runtime Agnostic
Use the same helpers in browsers, Node.js, SSR, serverless, edge runtimes, Vue, React, or plain TypeScript.
Intervals + Workweeks
Build predictable calendar structures such as day lists, intervals, weekdays, month labels, and workweek ranges.
Deterministic Testing
Prefer caller-provided values and explicit UTC helpers when server/client timezone differences matter.
Room to Grow
Calendar adapters, instant conversion, range math, and duration helpers can grow without tying the core to a UI framework.
Wall-clock friendly first, explicit instant conversion when needed
ISO strings with seconds, milliseconds, and timezone suffixes can be parsed today. The suffix is stored instead of silently converting the value, while instant helpers let apps convert wall-clock selections into UTC storage when they need a shared moment in time.