Day.js isBefore Lab

Medium
9
50.0% Acceptance

In this lab, you will be using the Day.js library to work with dates and times. Specifically, you will be implementing the isBefore functionality. The isBefore function checks if a Day.js object is before another Day.js object.

You have to complete the following tasks using ES6 module syntax:

  1. Install Day.js library using npm.
  2. Create a function named compareDates which takes two Date objects and returns true if the first date is before the second date.
  3. Use Day.js isBefore function inside compareDates function.
  4. Export the compareDates function using ESM default export.