Skip to main content

Modern date-time for JavaScript

Atemporal brings the power of the Temporal API to your JavaScript projects with a familiar Day.js-inspired syntax. Immutable, chainable, and built for modern development.

Quick start

Get up and running with Atemporal in minutes

1

Install the package

Install Atemporal using your preferred package manager:
npm install atemporal
2

Import and use

Import Atemporal and start working with dates:
import atemporal from "atemporal";

const now = atemporal();
console.log(now.format("YYYY-MM-DD HH:mm:ss"));
3

Extend with plugins

Load plugins to unlock additional functionality:
import atemporal from "atemporal";
import relativeTime from "atemporal/plugins/relativeTime";

atemporal.extend(relativeTime);

const past = atemporal().subtract(2, "hours");
console.log(past.fromNow()); // "2 hours ago"

Key features

Everything you need for modern date-time handling

Immutable & chainable

Fluent API inspired by Day.js with immutable operations

Plugin-powered

Lightweight core with 8 powerful plugins for extended functionality

Time zone aware

First-class support for IANA time zones powered by Temporal

TypeScript ready

Full type safety with TypeScript definitions included

Explore the documentation

Learn everything you need to master Atemporal

Core concepts

Understand how Atemporal handles dates, time zones, and formatting

API reference

Comprehensive reference for all methods and functions

Plugins

Explore all 8 plugins and their capabilities

Migration guide

Switch from Day.js, Luxon, or Moment.js

Advanced patterns

Learn best practices and advanced techniques

Examples

Real-world examples and use cases

Ready to get started?

Install Atemporal today and bring modern date-time handling to your JavaScript projects.

Get started now

Build docs developers (and LLMs) love