I have a date coming over from a database. The response is via django python (although that shouldn't matter since json is json) but context. I then get the current date in javascript. the goal is to take todays date and the one sent over by the server and find out how many days apart.
example today and tomorrow is 1 day away
I also have a screen shot of the console.
What am I doing wrong.
const today = new Date();
console.log('today');
console.log(today);
const creationdate = this.creatorobject.creationdate;
console.log(creationdate);
const dayssince = today - creationdate;
console.log('here is days since');
console.log(dayssince);