~/recurring-dates
docs

Installation

Install recurring-dates via npm, yarn, or pnpm. A UMD bundle is also available via CDN.

Package Manager

npm
npm install recurring-dates
yarn
yarn add recurring-dates
pnpm
pnpm add recurring-dates

CDN

Load the UMD bundle directly in a <script> tag. The library is available as RecurringDates on the global scope.

CDN via jsDelivr
<script src="https://cdn.jsdelivr.net/npm/recurring-dates/dist/index.umd.js"></script>
<script>
  const { getRecurringDates } = RecurringDates;
  console.log(getRecurringDates({
    STARTS_ON: "01-01-2025",
    ENDS_ON: "05-01-2025",
  }));
</script>

Requirements

Dependency

moment.js (^2.30.1) is the only runtime dependency. It is bundled with the library.

React (optional)

The useRecurringDates hook requires React 17 or 18 as a peer dependency. If you only use generateRecurringDatesor getRecurringDates, React is not needed.