istoday-date

This will check is date is today or not

Usage no npm install needed!

<script type="module">
  import istodayDate from 'https://cdn.skypack.dev/istoday-date';
</script>

README

Available Scripts

In the project directory, you can run:

npm i istoday-date

To Check Date, is today or not.

import { isToday } from 'istoday-date;
use in code

const checkToday = isToday(new Date()); // true,false

To Check date difference by start and end date.

import { checkDateDifference } from 'istoday-date;
use in code
const startDate = new Date();
const endDate = new Date();
const dateDifference = checkDateDifference(startDate, endDate);
// you will get number
0 if no difference
-1 if end date is small
positive number if start date is smaller than end date
import { checkDateMonthDifference } from 'istoday-date;
use in code
const startDate = new Date();
const endDate = new Date();
const dateDifference = checkDateMonthDifference(startDate, endDate);
// you will get number in difference