<img src="docs/public/tempo.png" alt="TEMPO" width="500" height="195">

[![Vitest](https://github.com/formkit/tempo/actions/workflows/tests.yml/badge.svg)](https://github.com/formkit/tempo/actions/workflows/tests.yml)
![GitHub Sponsors](https://img.shields.io/github/sponsors/formkit)
![NPM Version](https://img.shields.io/npm/v/%40formkit%2Ftempo)

# Tempo — The easiest way to work with dates in JavaScript (and TypeScript)

Tempo is a new library in a proud tradition of JavaScript date and time libraries. Inspired by the likes of moment.js, day.js, and date-fns Tempo is built from the ground up to be as small and easy to use as possible.

Tempo is best thought of as a collection of utilities for working with `Date` objects — an important distinction from other libraries that provide custom date primitives. Under the hood, Tempo mines JavaScript's `Intl.DateTimeFormat` to extract complex data like timezones offsets and locale aware date formats giving you a simple API to format, parse, and manipulates dates.

Tempo is tiny tree-shakable framework, you can only take what you need. You can work with timezones with only a few bytes of library code, or perform full international date formatting for ~2Kb (minified and brotlied). [Size Limit](https://github.com/ai/size-limit) controls the size.

## Development

Install from the repository root with `pnpm`:

```bash
corepack enable
pnpm install
```

Build the library:

```bash
pnpm build
```

Build the docs app:

```bash
pnpm docs-build
```

<a href="https://tempo.formkit.com">
<img src="docs/public/read-the-docs.png" alt="Read the docs" width="200" height="43">
</a>

---

Created by the <a href="https://formkit.com">FormKit team</a>.
