istoday-date
v3.0.6
Published
This will check is date is today or not
Downloads
7
Maintainers
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