Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/date-fns/date-fns
⏳ Modern JavaScript date utility library ⌛️
https://github.com/date-fns/date-fns
date date-fns hacktoberfest javascript modules nodejs time utilities
Last synced: 3 days ago
JSON representation
⏳ Modern JavaScript date utility library ⌛️
- Host: GitHub
- URL: https://github.com/date-fns/date-fns
- Owner: date-fns
- License: mit
- Created: 2014-10-06T10:24:22.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2024-09-23T08:07:29.000Z (3 months ago)
- Last Synced: 2024-12-02T07:06:10.852Z (10 days ago)
- Topics: date, date-fns, hacktoberfest, javascript, modules, nodejs, time, utilities
- Language: TypeScript
- Homepage: https://date-fns.org
- Size: 22.1 MB
- Stars: 34,952
- Watchers: 207
- Forks: 1,794
- Open Issues: 770
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-frontend - date-fns - Modern JavaScript date utility library. ![](https://img.shields.io/github/stars/date-fns/date-fns.svg?style=social&label=Star) (Repository / Date & Time)
- awesome-frontend-lib - date-fns
- stars - date-fns/date-fns
- awesome - date-fns/date-fns - ⏳ Modern JavaScript date utility library ⌛️ (TypeScript)
- awesome - date-fns - ⏳ Modern JavaScript date utility library ⌛️ (JavaScript)
- awesome-ihave - date-fns
- awesome-nodejs-cn - date-fns - 现代日期工具 (包 / 日期)
- awesome-nodejs - date-fns - Modern JavaScript date utility library. ![](https://img.shields.io/github/stars/date-fns/date-fns.svg?style=social&label=Star) (Repository / Date & Time)
- awesome-nodejs-cn - date-fns - **star:34839** 现代实用程序 ![star > 2000][Awesome] (包 / 日期)
- awesome-github-star - date-fns - fns | 32350 | (TypeScript)
- awesome-list - date-fns - fns | 26620 | (JavaScript)
- awesome-nodejs - date-fns - Modern date utility. (Packages / Date)
- best-of-react - GitHub - 34% open · ⏱️ 13.05.2024): (Utilities)
- StarryDivineSky - date-fns/date-fns
- awesome-npm - date-fns - 较 moment 更轻量级的事件处理库,体积更小 (4. 工具 / 4.1 Util)
- awesome-javascript - date-fns - Modern JavaScript date utility library - ★ 14943 (Date)
- awesome-nodejs - date-fns - Modern JavaScript date utility library - ★ 14943 (Date)
- my-awesome - date-fns - Modern JavaScript date utility library. (Library)
- awesome-node - date-fns - Modern date utility. (Packages / Date)
- awesome-f2e-libs - **date-fns** - 时间处理。 (工具类 / macros)
- awesome-nodejs-cn - date-fns - 现代日期工具. (目录 / 日期处理)
- awesome-nodejs - date-fns - 日期工具类库,提供了最全面、最简单和一致的工具集 (Uncategorized / Uncategorized)
- awesome-fe - **date-fns** - 时间处理。 (工具类 / macros)
- awesome-star-libs - date-fns / date-fns
- jimsghstars - date-fns/date-fns - ⏳ Modern JavaScript date utility library ⌛️ (TypeScript)
- my-awesome-list - date-fns - fns | 35005 | (TypeScript)
- awesome - date-fns/date-fns - ⏳ Modern JavaScript date utility library ⌛️ (TypeScript)
- awesome - date-fns/date-fns - ⏳ Modern JavaScript date utility library ⌛️ (TypeScript)
README
🔥️ **NEW**: [date-fns v4.0 with first-class time zone support is out!](https://blog.date-fns.org/v40-with-time-zone-support/)
date-fns provides the most comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js
👉 [Documentation](https://date-fns.org/)
👉 [Blog](https://blog.date-fns.org/)
It's like [Lodash](https://lodash.com) for dates
- It has [**200+ functions** for all occasions](https://date-fns.org/docs/Getting-Started/).
- **Modular**: Pick what you need. Works with webpack, Browserify, or Rollup and also supports tree-shaking.
- **Native dates**: Uses existing native type. It doesn't extend core objects for safety's sake.
- **Immutable & Pure**: Built using pure functions and always returns a new date instance.
- **TypeScript**: The library is 100% TypeScript with brand-new handcrafted types.
- **I18n**: Dozens of locales. Include only what you need.
- [and many more benefits](https://date-fns.org/)```js
import { compareAsc, format } from "date-fns";format(new Date(2014, 1, 11), "yyyy-MM-dd");
//=> '2014-02-11'const dates = [
new Date(1995, 6, 2),
new Date(1987, 1, 11),
new Date(1989, 6, 10),
];
dates.sort(compareAsc);
//=> [
// Wed Feb 11 1987 00:00:00,
// Mon Jul 10 1989 00:00:00,
// Sun Jul 02 1995 00:00:00
// ]
```The library is available as an [npm package](https://www.npmjs.com/package/date-fns).
To install the package run:```bash
npm install date-fns --save
```## Docs
[See date-fns.org](https://date-fns.org/) for more details, API,
and other docs.
## License
[MIT © Sasha Koss](https://kossnocorp.mit-license.org/)