United Statesformkit/tempo
📆 Parse, format, manipulate, and internationalize dates and times in JavaScript and TypeScript.
📆 Tempo: Lightweight Date Utilities Built on Native JavaScript Dates
A small, tree-shakable toolkit for formatting, parsing, and manipulating dates without custom date primitives.
Tempo, created by the FormKit team, is a JavaScript and TypeScript library for working with dates and times. Inspired by libraries like moment.js, day.js, and date-fns, it focuses on simplicity and small size while operating directly on native Date objects. Under the hood, Tempo uses Intl.DateTimeFormat to handle timezone offsets and locale-aware formatting.
✨ Highlights
- Native
Dateobjects: Works with standard JavaScriptDateinstances instead of introducing a custom date primitive. - Parse, format, and manipulate: Provides utilities for common date and time operations in JavaScript and TypeScript.
- Internationalization support: Uses
Intl.DateTimeFormatfor locale-aware date formatting and timezone-related data. - Timezone utilities: Lets you work with timezones with only a small amount of library code.
- Tiny and tree-shakable: Import only what you need; full international date formatting is around ~2Kb minified and brotlied.
- Size-conscious build: Uses Size Limit to help control package size.
💡 Why it matters
Many date libraries wrap dates in their own objects, which can add API overhead and bundle weight. Tempo takes a different approach by building utilities around the native Date and leveraging the platform's internationalization features, so you get practical formatting and timezone support without adopting a separate date model.
It fits well when you want modern date utilities in JavaScript or TypeScript but prefer to keep dependencies small and stay close to native APIs. For projects that need locale-aware formatting or targeted date helpers, Tempo offers a focused alternative to heavier all-in-one date libraries.
#JavaScript #TypeScript #DateTime #OpenSource #TiniX
Similar Projects
Discover other similar projects and AI models.
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API