Skip to content
React Libraries
On this page

Format a date

Format, parse, and work with dates across locales and timezones.

Options for this task

@internationalized/date

Library / tool

Date and time objects for calendars, timezones, and internationalized interfaces.

Good for
Building date controls that need explicit calendar and timezone behavior.

Chrono

Library / tool

A parser that recognizes dates expressed in natural language.

Good for
Turning phrases such as next Friday into structured date information.

date-fns

Date utilities

Functions for formatting, parsing, and manipulating JavaScript dates.

Good for
Picking individual functions for the date operations you need.
Keep in mind
Date calculations and formatting, rather than a date picker UI.

Day.js

Date utilities

A compact date library with a chainable API.

Good for
Working with dates through a familiar, chainable API.
Keep in mind
Add plugins for capabilities beyond the core.

pretty-ms

Library / tool

A formatter that converts milliseconds into readable durations.

Good for
Showing elapsed time and task durations in interfaces or logs.

Spacetime

Library / tool

Date and time utilities with timezone-aware manipulation.

Good for
Working with dates across timezones using a chainable interface.

Before you decide

Try a small, realistic example. Check the runtime, accessibility, maintenance, and license requirements for the features you need.

Browse dates & time →

Explore more tasks →