For a lightweight JavaScript library for date formatting, the first results are moment/luxon (Luxon is a modern, dependency-free JavaScript library purpose-built for parsing and formatting dates with full support for custom tokens, multiple formats, and locale-aware output via the native Intl API—meeting your requirements for a small, efficient library), date-fns/date-fns (date-fns is a modular, tree-shakeable JavaScript library that provides pure functions for parsing dates from strings and formatting them with custom tokens and locale support, and it has no external dependencies, making it a comprehensive fit for efficient date string handling) and iamkun/dayjs. formkit/tempo and moment/moment round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
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 calen
Luxon is a modern, dependency-free JavaScript library purpose-built for parsing and formatting dates with full support for custom tokens, multiple formats, and locale-aware output via the native Intl API—meeting your requirements for a small, efficient library.
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 re
date-fns is a modular, tree-shakeable JavaScript library that provides pure functions for parsing dates from strings and formatting them with custom tokens and locale support, and it has no external dependencies, making it a comprehensive fit for efficient date string handling.
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 archit
Day.js is a lightweight, dependency-free JavaScript date library that provides parsing and formatting with a familiar Moment-like API, supports locale-aware output via optional plugins, and is tree-shakeable as an ES module — exactly the small, efficient tool this search is after.
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
Tempo is a full-featured JavaScript library for parsing, formatting, and manipulating dates, with locale-aware formatting via the Intl API and support for custom format tokens, matching the core request for date parsing and formatting—though its breadth may mean a larger bundle than the "minimal" emphasis in this search.
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 co
Moment.js is a widely used date parsing and formatting library with locale support and custom tokens, fitting the category, but its large bundle size, lack of tree-shakeable ES modules, and bundled dependencies go against the request for a minimal and efficient library.
:clock2: Immutable date and time library for javascript
js-joda is a full-featured immutable date and time library that can parse and format dates with custom tokens and locale support, but its comprehensive approach means it is not minimal or as lightweight as you're looking for.
Globalize is a JavaScript internationalization library that uses Unicode Common Locale Data Repository JSON data to provide localization services. It functions as a locale-aware string formatter and a system for transforming dates, times, currencies, and numeric values into strings based on specific locale patterns. The library includes a precompiled localization engine that generates optimized formatting functions during the build process. This approach reduces runtime overhead and removes the requirement to load raw locale data at execution. The project covers a broad range of internationa
Globalize is a full internationalization library that includes date formatting and parsing, but it is not a small, efficient library focused solely on dates — it bundles many other locale features and depends on CLDR data, making it heavier than the lightweight, tree-shakeable date parser/formatter the visitor is seeking.
Globalize is a JavaScript internationalization library and Unicode CLDR localization engine. It provides a toolkit for formatting dates, numbers, and currencies using the Unicode Common Locale Data Repository and IANA time zones. The project features a build-time localization compiler that precompiles rules into static formatters to reduce runtime overhead and bundle size. It includes a system for parsing and formatting complex strings using the ICU MessageFormat syntax, supporting variables, pluralization, and gender inflections. The library covers a broad surface of localization capabiliti
Globalize is a full internationalization library covering dates, numbers, currencies, and ICU message formatting with CLDR data dependencies, making it far heavier and broader than the small, focused date parser/formatter you are looking for.
Pikaday is a lightweight JavaScript datepicker library and client-side date input manager. It provides a standalone calendar interface for selecting dates in web applications as a zero-dependency UI component that operates without external frameworks or libraries. The tool features a modular CSS architecture that separates structural logic from visual presentation, allowing for flexible customization of the calendar layout. It includes built-in support for calendar localization, enabling the update of month names and weekday labels to match specific languages or regions. The library manages
Pikaday is a client-side datepicker widget rather than a dedicated date parsing and formatting library; while it internally handles dates, its core identity is a UI component, not the focused parser/formatter you are looking for.
react-dates is a set of React components for date selection, providing interfaces for picking single dates or date ranges through controlled input components and calendars. The project features built-in support for internationalization, allowing date formats and interface strings to be translated via locale settings. It also supports visual customization through theme registration and CSS overrides to match specific application styles. The component suite covers a variety of selection workflows, including calendar range selection and date range input fields.
This is a React component library for date picker UIs, not a standalone library for parsing and formatting date strings — while it handles dates, it focuses on selection widgets rather than the parsing/formatting workflow this search targets.
pickadate.js is a responsive jQuery date and time picker designed for web forms. It provides a localized input interface that allows users to select specific calendar dates and precise clock times. The library features a customizable calendar UI with configurable colors, sizes, and breakpoints. It includes a localization system to adapt interface text and date formats into multiple languages and regional settings. The component includes interactive date and time inputs and a styling system for modifying visual design to match specific brand identities. Its layout automatically adjusts for di
Pickadate is a jQuery-based date and time picker widget for forms, not a library for programmatically parsing dates from strings or formatting them with custom tokens, so it does not fit the search for a minimal parsing/formatting utility.
Pikaday is a lightweight JavaScript datepicker widget and dependency-free UI component. It provides a graphical calendar interface for selecting dates that binds to form fields without requiring external libraries or frameworks. The project features a localizable calendar interface, allowing for the customization of month names, weekday labels, and regional text directions to support multiple languages. Its programmable API manages input formatting and selection restrictions. The tool covers a broad range of date selection capabilities, including date input validation, range restrictions, an
Pikaday is a datepicker widget for selecting dates via a calendar UI, not a dedicated library for parsing date strings or formatting date outputs, which is what this search targets.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| moment/luxon | 16.4K | JavaScript | mit | |
| date-fns/date-fns | 36.6K | TypeScript | — | |
| iamkun/dayjs |
| 48.7K |
| JavaScript |
| MIT |
| formkit/tempo | 2.6K | TypeScript | mit |
| moment/moment | 48K | JavaScript | MIT |
| js-joda/js-joda | 1.7K | JavaScript | NOASSERTION |
| jquery/globalize | 4.8K | JavaScript | MIT |
| globalizejs/globalize | 4.8K | JavaScript | MIT |
| pikaday/pikaday | 8.1K | JavaScript | NOASSERTION |
| airbnb/react-dates | 12.2K | JavaScript | MIT |