Day.js isBefore Lab
Medium
9
50.9% 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:
- Install Day.js library using npm.
- Create a function named
compareDates
which takes two Date objects and returnstrue
if the first date is before the second date. - Use Day.js
isBefore
function insidecompareDates
function. - Export the
compareDates
function using ESM default export.