JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10152
  • Score
    100M100P100Q144952F
  • License MIT

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.

Package Exports

  • date-manip
  • date-manip/dist/index.js
  • date-manip/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (date-manip) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

date-manip

npm package

NPM Version NPM Downloads jsDelivr


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

Quick Start

Installation

Install date-manip via npm:

npm install date-manip

Basic Usage

Here’s a quick example to get you started:

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.