Untitled

 avatar
unknown
plain_text
a year ago
435 B
5
Indexable
update the below code so that it can find the difference between the current date and the due date


 const formatDueDate = (dueDT) => {
        const dueDate = dueDT;
        const today = new Date();
        const daysDifference = today - dueDate;

        console.log(dueDate); //06-13-2024
        console.log(today);
        console.log(daysDifference);

        return `${dueDate} (${daysDifference} days)`;

    };
Editor is loading...
Leave a Comment