public/subjects/date-is/README.md

904 B

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