retesere20

bug js-date node

Jul 9th, 2021
12
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. dateAddSeconds2(date, seconds){
  3. var newDate = new Date(date);
  4. console.log("--"+seconds);
  5. console.log(date);
  6. console.log(newDate);
  7. newDate.setSeconds(newDate.getSeconds() + seconds);
  8. console.log(newDate);
  9. return newDate;
  10. }
  11.  
  12.  
  13. console.log( dateAddSeconds2 ( Date.parse("2021-07-09T18:54:59.000Z"), 15) );
RAW Paste Data