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:Extensible Plugin System
Atemporal’s core is intentionally lightweight. Add functionality as needed through plugins:relativeTime
relativeTime
Add
.fromNow() and .toNow() methods for human-readable relative times like “5 minutes ago”customParseFormat
customParseFormat
Parse complex date strings with custom format patterns like “DD/MM/YYYY”
advancedFormat
advancedFormat
Extended formatting options including ordinals (“1st”, “2nd”) and quarter formatting
weekDay
weekDay
Enhanced weekday handling with configurable week start days
durationHumanizer
durationHumanizer
Convert durations into human-readable strings like “2 years, 3 months”
businessDays
businessDays
Working day calculations with holiday support for business applications
timeSlots
timeSlots
Find available time slots in schedules for booking systems
dateRangeOverlap
dateRangeOverlap
Detect and calculate intersections between date ranges
Localization Built-In
Atemporal leverages the nativeIntl API for formatting, giving you built-in support for any locale:
Comparison to Other Libraries
- vs Day.js
- vs Luxon
- vs Moment.js
Similarities:
- Nearly identical chainable API
- Plugin architecture
- Small bundle size philosophy
- 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
Next Steps
Installation
Get Atemporal installed in your project
Quick Start
Build your first date-time feature in minutes