Compact open-source JavaScript utilities for parsing, manipulating, and formatting date and time strings efficiently.
Luxon is a JavaScript library for parsing, validating, manipulating, and formatting dates and times. It provides a suite of immutable objects for managing points in time, durations, and intervals, ensuring that all transformations return new instances to maintain predictable state. The library distinguishes itself by leveraging the native Internationalization API and environment-based time zone databases. This architecture allows for localized date formatting and global time zone conversions without requiring external data files or additional dependencies. It also supports non-Gregorian calendar systems to accommodate diverse regional requirements. The library features a chainable, fluent interface that organizes complex temporal operations into readable sequences. Its core design separates parsing logic from rendering logic, providing a consistent framework for calendar arithmetic, interval calculations, and cross-cultural date representation.
Luxon is a comprehensive, immutable date and time library that natively handles parsing, formatting, and time zone conversions using the browser's built-in Internationalization API.
date-fns is a JavaScript date utility library providing a collection of pure functions for manipulating, formatting, and calculating dates and times. It serves as an immutable date manipulation library and a tool for time zone management, ensuring that date transformations are performed without modifying the original date objects. The library functions as a date formatting tool that converts date objects into human-readable strings using custom patterns and international locales. It includes a specific toolset for adjusting and calculating date representations across different geographical regions and time offsets. The project covers a broad range of temporal capabilities, including date manipulation, temporal data calculation, and international date formatting tailored to regional standards.
This library provides a comprehensive, modular collection of pure functions for date manipulation, formatting, and time zone support that is designed to be lightweight through tree-shaking.
Tempo is a JavaScript date manipulation library that provides a suite of tools for parsing, formatting, and calculating dates and times. It serves as a date arithmetic engine, a locale-aware formatter, and a timezone offset manager for native JavaScript date objects. The library includes a dedicated ISO 8601 date parser for validating and converting standardized strings into date objects. It handles geographic normalization through IANA timezone offset management and utilizes the native Internationalization API for region-specific date formatting. The project covers a broad range of date and time capabilities, including date difference calculations, the manipulation of specific time units, and the normalization of time boundaries. It also provides utilities for comparing dates, setting specific date components, and generating localized date ranges.
Tempo is a lightweight, immutable JavaScript library that provides comprehensive tools for parsing, formatting, and manipulating dates while leveraging native APIs for efficient timezone and locale support.
Day.js is a lightweight utility for parsing, validating, and manipulating date objects. It provides a fluent, chainable interface that allows for complex time calculations and transformations to be performed through a sequence of readable method calls. By utilizing an immutable wrapper pattern, the library ensures data integrity by creating new instances for every operation rather than modifying existing objects. The project is distinguished by a minimalist core abstraction that maintains a small footprint by offloading non-essential features to an optional, modular plugin system. This architecture allows developers to extend functionality or add specialized formatting capabilities by registering independent modules only when needed. Furthermore, the library includes an internationalization engine that supports dynamic, lazy loading of locale data to keep bundle sizes minimal while respecting regional date and time conventions.
Day.js is a lightweight, immutable JavaScript library that provides a modular approach to date parsing, formatting, and manipulation, making it a perfect fit for your requirements.
Moment is a JavaScript date manipulation library used for parsing, validating, manipulating, and formatting dates and times. It provides a system for converting date strings into structured objects using the ISO 8601 standard or custom tokens. The library includes a timezone management tool for handling UTC offsets and geographic timezones, ensuring accurate date calculations across different regions. It features an internationalized date formatter and a relative time calculator to render timestamps as human-friendly durations adapted to various cultural locales and languages. The project covers a broad range of temporal capabilities, including date value modification, comparison, and difference calculations. It also provides tools for temporal data validation and the conversion of date objects into human-readable strings using customized display patterns.
Moment is a comprehensive and widely-used library for parsing, formatting, and manipulating dates, though it is significantly larger and more feature-heavy than the lightweight utilities often preferred in modern JavaScript development.