Skip to main content
Atemporal is a modern date-time library that provides a familiar, chainable API powered by the JavaScript Temporal API. It combines the ergonomics of Day.js with the power and correctness of Temporal, offering a smooth migration path for projects looking to modernize their date-time handling.

Why Atemporal?

The Temporal API is the future of date-time handling in JavaScript, but its API can be verbose and unfamiliar to developers used to libraries like Day.js, Luxon, or Moment.js. Atemporal bridges this gap by providing:

Immutable & Chainable

Fluid API inspired by Day.js that makes date manipulation intuitive and safe

Plugin-Powered

Lightweight core with an extensible plugin system - only load what you need

Time Zone Aware

First-class support for IANA time zones built on Temporal’s robust implementation

Type-Safe

Built with TypeScript for excellent developer experience and compile-time safety

Key Features

Modern Foundation

Atemporal is built on top of the Temporal API, the upcoming standard for date-time handling in JavaScript. This means you get:
  • Correct arithmetic across time zones and daylight saving transitions
  • Native support for all calendar systems
  • Proper handling of edge cases that plague older libraries
  • Future-proof code that aligns with web standards

Familiar Developer Experience

If you’ve used Day.js or Moment.js, you’ll feel right at home:
import atemporal from 'atemporal';

const now = atemporal();
const future = now.add(3, 'days').startOf('day');
console.log(future.format('YYYY-MM-DD')); // "2026-03-07"

Extensible Plugin System

Atemporal’s core is intentionally lightweight. Add functionality as needed through plugins:
Add .fromNow() and .toNow() methods for human-readable relative times like “5 minutes ago”
Parse complex date strings with custom format patterns like “DD/MM/YYYY”
Extended formatting options including ordinals (“1st”, “2nd”) and quarter formatting
Enhanced weekday handling with configurable week start days
Convert durations into human-readable strings like “2 years, 3 months”
Working day calculations with holiday support for business applications
Find available time slots in schedules for booking systems
Detect and calculate intersections between date ranges

Localization Built-In

Atemporal leverages the native Intl API for formatting, giving you built-in support for any locale:
atemporal.setDefaultLocale('fr-FR');
const date = atemporal('2024-07-26');
console.log(date.format({ dateStyle: 'long' }));
// "26 juillet 2024"

Comparison to Other Libraries

Similarities:
  • Nearly identical chainable API
  • Plugin architecture
  • Small bundle size philosophy
Advantages of Atemporal:
  • Built on Temporal API for correctness
  • Proper time zone support
  • Handles calendar edge cases correctly
  • Future-proof with web standards

When to Use Atemporal

New projects that need modern date-time handling
Applications requiring robust time zone support
Projects migrating from Day.js or Moment.js
TypeScript projects that want type safety
Apps that need internationalization
Atemporal requires Node.js 18+ and uses the Temporal polyfill in environments without native support. The polyfill adds ~50KB to your bundle. Native Temporal support is coming to browsers in 2026.

Next Steps

Installation

Get Atemporal installed in your project

Quick Start

Build your first date-time feature in minutes

Build docs developers (and LLMs) love