# date-manip

> A lightweight JavaScript date utility library that provides modularity, high performance, and additional features. It supports various date operations, including date addition and subtraction, formatting, comparison, etc.

Latest version **2.0.6** (published 2025-04-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install date-manip
pnpm add date-manip
yarn add date-manip
bun add date-manip
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.6 |
| Published | 2025-04-30 |
| First published | 2019-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 181.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Jesse Feng |
| Maintainers | fengxinming |
| Keywords | date, util, moment |

## Links

- npm: https://www.npmjs.com/package/date-manip
- Repository: https://github.com/fengxinming/util
- Homepage: https://fengxinming.github.io/util/modules/date-manip/
- Issues: https://github.com/fengxinming/util/issues
- npm.io page: https://npm.io/package/date-manip

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 2.0.6 (latest) — 2025-04-30
- 2.0.5 — 2025-04-25
- 2.0.4 — 2025-03-20
- 2.0.3 — 2025-03-16
- 2.0.2 — 2025-03-14
- 2.0.1 — 2025-03-12
- 2.0.0 — 2025-03-08
- 1.0.1 — 2019-11-07
- 1.0.0 — 2019-11-04

## README

# date-manip

[![npm package](https://nodei.co/npm/date-manip.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/date-manip)

[![NPM Version](https://img.shields.io/npm/v/date-manip.svg?style=flat)](https://npmjs.org/package/date-manip)
[![NPM Downloads](https://img.shields.io/npm/dm/date-manip.svg?style=flat)](https://npmjs.org/package/date-manip)
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/date-manip/badge)](https://www.jsdelivr.com/package/npm/date-manip)

---

## Introduction

`date-manip` is a lightweight and modular JavaScript library for handling date operations with high performance. It provides a rich set of features, including date arithmetic (addition/subtraction), formatting, comparison, and more.

Whether you're building a small utility or a large-scale application, `date-manip` simplifies complex date manipulations while maintaining efficiency and flexibility.

## Features

- **Modularity**: Supports modular import and on-demand loading.
- **High Performance**: Optimized performance for various scenarios.
- **Chaining**: Supports chaining, making the code more concise.
- **Rich Features**: Supports date addition and subtraction, formatting, comparison, and other operations.

## Documentation

For detailed usage instructions and API references, please visit the official documentation:

👉 [View Full Documentation](https://fengxinming.github.io/util/modules/date-manip/)

## Quick Start

### Installation

Install `date-manip` via npm:

```bash
npm install date-manip
```

### Basic Usage

Here’s a quick example to get you started:

```javascript
import { addDays, format } from 'date-manip';

// Add 5 days to the current date
const newDate = addDays(new Date(), 5);

// Format the date as "YYYY-MM-DD"
console.log(format(newDate, 'YYYY-MM-DD'));
```

## Contributing

We welcome contributions from the community! If you find a bug or want to suggest an improvement, feel free to open an issue or submit a pull request.

### How to Contribute
1. Fork the repository.
2. Create a new branch for your changes.
3. Submit a pull request with a clear description of your changes.

## License

This project is licensed under the [MIT License](LICENSE).

---
_Source: https://npm.io/package/date-manip · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
