You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
## Date Is
|
|
|
|
|
|
|
|
### Instructions
|
|
|
|
|
|
|
|
Create the following functions:
|
|
|
|
|
|
|
|
- `isValid`: accepts a `Date`, and returns `false` if the `Date` is invalid.
|
|
|
|
- `isAfter`: accepts two `Date` arguments, and returns `true` if the first is greater then the second.
|
|
|
|
- `isBefore`: accepts two `Date` arguments, and returns `true` if the second is greater than the first.
|
|
|
|
- `isFuture`: accepts a `Date`, and returns `true` if the `Date` is valid, and is after than the present date.
|
|
|
|
- `isPast`: accepts a `Date`, and returns `true` if the `Date` is valid, and is before the present date.
|
|
|
|
|
|
|
|
### Notions
|
|
|
|
|
|
|
|
- [date-fns: isValid](https://date-fns.org/v2.14.0/docs/isValid)
|
|
|
|
- [date-fns: isAfter](https://date-fns.org/v2.14.0/docs/isAfter)
|
|
|
|
- [date-fns: isBefore](https://date-fns.org/v2.14.0/docs/isBefore)
|
|
|
|
- [date-fns: isFuture](https://date-fns.org/v2.14.0/docs/isFuture)
|
|
|
|
- [date-fns: isPast](https://date-fns.org/v2.14.0/docs/isPast)
|