Skip to content
Tempo Logo

Tempo

The Professional Date-Time Library for the Temporal API

Tempo is a premium, high-performance wrapper for the ECMAScript Temporal API. Designed for professionals, it combines immutable state-management with a fluent, natural-language engine. It is the modern, type-safe successor to legacy libraries like Moment.js and Luxon.

License: MITTemporalTypeScript ReadyNative ESMDocumentation

⚡ Quick Start

javascript
import { Tempo } from '@magmacomputing/tempo';

// 🎯 Natural Language Parsing (Deterministic anchor)
const event = new Tempo('next Friday 3pm', { anchor: '2026-10-15' });

// 🔄 Fluent Mutations (Immutable)
const reminder = event.add({ hours: 2 }).set({ minute: 0 });

// ⏳ Comparative Durations
const diff = event.until('2026-12-25');
console.log(diff.iso); // P2M2D

// 📝 Beautiful Formatting
console.log(event.format('{mon} {day}, {yyyy}')); // October 23, 2026

📦 Installation

bash
npm install @magmacomputing/tempo       # npm
yarn add @magmacomputing/tempo          # yarn
pnpm add @magmacomputing/tempo          # pnpm
bun add @magmacomputing/tempo           # bun
deno add npm:@magmacomputing/tempo      # deno
🌐 Browser & Lite Environments

For modern browsers using Import Maps:

html
<script type="importmap">
{
  "imports": {
    "@magmacomputing/tempo": "https://cdn.jsdelivr.net/npm/@magmacomputing/tempo@2/dist/tempo.bundle.esm.js"
  }
}
</script>

For rapid prototyping without a package manager (UMD):

html
<script src="https://cdn.jsdelivr.net/npm/@magmacomputing/tempo@2/dist/tempo.bundle.js"></script>

For granular "Lite" builds, see the Full Installation Guide.


✨ Why Tempo?

  • 🏗️ Future Standard: Built natively on the TC39 Temporal proposal. Inherit the reliability of the future standard.
  • 🗣️ Natural Language: Resolve complex terms like #quarter.last or "two days ago" with zero configuration.
  • 🔄 Cycle Persistence: Shift by semantic terms (Quarters, Seasons) while preserving your relative day-of-period offset.
  • ⚡ Zero-Cost Parsing: Lazy evaluation and smart matching ensure instantiation overhead is near-zero.
  • 🛡️ Monorepo Resilient: Built for stability in complex environments with proxy-protected registries.
  • 📦 Tree-Shakable: Keep your bundle light. Only load what you need—from Fiscal calendars to high-performance Tickers.

📚 Documentation

For a deeper dive into the API, architecture, and advanced features:


💬 Contact & Support

  1. Bug Reports & Features: Please open an Issue.
  2. Questions & Ideas: Start a thread in Discussions.
  3. Direct Contact: You can reach me at hello@magmacomputing.com.au.

🗳️ Feedback & Reactions

🚀 Premium!   |   ⭐ Loving it!   |   💡 Needs work   |   🐞 Found a bug


⚖️ License

Distributed under the MIT License. See LICENSE for more information.

Released under the MIT License.