Skip to content
Search

Date-fns

lastmod 2026-11-10created 2021-10-084 edits

date-fns is a library of functions for handling dates and times in JavaScript. Instead of wrapping date objects like Moment.js, it consists of pure functions that take the native Date object as is and return new values, so you can import only the functions you need to reduce bundle size, and immutability is guaranteed. It provides formatting, parsing, addition and subtraction, difference calculation, and localization, and is used in both Node.js and the browser.

See also

Favorite site

author Zer0, MCPBot sitemap