@eristack/timestamp
v0.1.0
Published
Business timestamps: UTC instants for facts, wall-clock for schedules (DST-safe)
Downloads
88
Readme
@eristack/timestamp
Business time primitives: instant mode (UTC facts) and wall mode (local intent, DST-safe).
@js-temporal/polyfillin core — not rawDatemath for zones- IANA
timezoneon both modes TimestampJSONwire shape ready for future./drizzle,./rest,./zodadapters (mirror@eristack/money)
Install
pnpm add @eristack/timestampQuick example
import {
instantOf,
toLocalDateString,
wallOf,
wallToInstantOnce,
} from "@eristack/timestamp";
// When it happened — transaction / posted time
const posted = instantOf("2026-08-22T02:30:00Z", "Asia/Jakarta");
console.log(toLocalDateString(posted)); // "2026-08-22"
// When it will happen — due at local wall clock
const due = wallOf("2026-09-15T00:00:00", "Europe/Paris");
const dueInstant = wallToInstantOnce(due);Documentation
See docs/ on the site: /docs/timestamp.
Skills
pnpm dlx @tanstack/intent@latest load @eristack/timestamp#timestamp-core
pnpm dlx @tanstack/intent@latest load @eristack/timestamp#timestamp-adapters