isDate()
Returns a boolean, false
if the first date is after the second date.
Usage
import { isDate } from 'easy-dates'
isDate(date)
Prop types
prop | type | required | default |
---|---|---|---|
date | date | yes | n/a |
Examples
isDate(new Date('2022-01-01')) // true
isDate(`${new Date('2022-01-01')}`) // false
isDate('2022-01-02') // false