How many days have passed to get the current date of 2018 and the current date of 2017?

how to get the current date of 2018 and the current date of 2017 how many days have passed?

the current date is 2018-07-02

how many days have passed since 2017-07-02 to 2018-07-02, and how do you calculate it?

Mar.23,2021

  1. time conversion
  2. get milliseconds of time difference
  3. is converted to the number of days, rounded as needed (rounded, etc.)
var milliSeconds =new Date('2018-07-02').getTime() - new Date('2017-07-02').getTime();
var seconds = milliSeconds/1000 //
var days = seconds / (3600 * 24) 

isn't it 365 dollars? Does this count?
all right

console.log((2018 - 2017) * 365);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c3f6-4d998.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c3f6-4d998.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?