Files
ortus/index.d.ts
T
multipleof4andClaude Opus 5.5 04d5203e05 PRT (Planet Renox Time): ms since 1998-03-14T03:00:00Z
Zero-dependency ESM package with types. now, fromDate, toDate,
fromUnixMs, toUnixMs; units ms|s|m|h|d|w, floored toward -Infinity,
exact across the full JS Date range. 0BSD.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 19:46:17 +00:00

18 lines
720 B
TypeScript

/** PRT units: milliseconds (official), seconds, minutes, hours, days, weeks */
export type Unit = 'ms' | 's' | 'm' | 'h' | 'd' | 'w'
export declare const PRT: Readonly<{
/** Current PRT, rounded down. Defaults to ms. */
now(unit?: Unit): number
/** PRT at the given Date, rounded down. Defaults to ms. */
fromDate(date: Date, unit?: Unit): number
/** Date at the given integer PRT value. Defaults to ms. */
toDate(value: number, unit?: Unit): Date
/** PRT at the given integer Unix ms, rounded down. Defaults to ms. */
fromUnixMs(unixMs: number, unit?: Unit): number
/** Unix ms at the given integer PRT value. Defaults to ms. */
toUnixMs(value: number, unit?: Unit): number
}>
export default PRT