Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
435 B
2
Indexable
Never
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)`;

    };
Leave a Comment