Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

dayjs-range-extend

imwh0im5kMIT1.0.4TypeScript support: included

Range extends For dayjs

dayjs, dayjs-range, dayjs-plugin, date, dayjs-range-extend

readme

Date Range Module Based on Day.js

NPM Version

Description

dayjs-range-extend is an extended module based on Day.js (can use the function of Day.js) that provides a date range.

Built with TypeScript and Maintains stability based on Unit-Test (used Jest)

Installation

  $ npm i --save dayjs-range-extend

How to use

  import dayjsRange from 'dayjs-range-extend';

  const date_range_first = dayjsRange('2022-01-01', '2022-01-05');
  const date_range_second = dayjsRange('2022-01-04', '2022-01-10');

  console.log(
    date_range_first.isOverlap(date_range_second);
  ); // => true

Documentaion