Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

add 24 hours to string date javascript

const stringData = "2022-05-06";
// add 24 hours
let newDate = new Date(new Date(stringData).getTime() + 60 * 60 * 24 * 1000)
console.log(newDate) // 2022-05-07T00:00:00.000Z
//add 23 hours and 59 minutes
let nDate = new Date(new Date(stringData).getTime() + 60 * 60 * 24 * 1000 - 1)
console.log(nDate) // 2022-05-06T23:59:59.999Z
Comment

PREVIOUS NEXT
Code Example
Javascript :: install expo cli mac os 
Javascript :: google apis jquery 
Javascript :: jquery select checked radio button value 
Javascript :: generate random hash in javascript 
Javascript :: js add space before capital letter 
Javascript :: jquery-3.5.1.slim.min.js download 
Javascript :: loop array backwards javascript 
Javascript :: jquery responsive 
Javascript :: javascript loop through class elements 
Javascript :: angular valuechanges get id 
Javascript :: “javascript sleep 1 second 
Javascript :: javascript window resize event 
Javascript :: javascript settimeout 
Javascript :: add id jquery 
Javascript :: delay in javascript 
Javascript :: remove special characters from string javascript 
Javascript :: check if localstorage key exists 
Javascript :: jquery click function 
Javascript :: apex charts cdn 
Javascript :: remove empty lines regex 
Javascript :: js timer reload page 
Javascript :: access-control-allow-origin nodejs express 
Javascript :: remove all inline css jquery 
Javascript :: jquery script tag 
Javascript :: function to generate random color in javascript 
Javascript :: javascript trello title swap 
Javascript :: how to set by jasmine.DEFAULT_TIMEOUT_INTERVAL 
Javascript :: how to run vue js project on different port 
Javascript :: install moment in goole dev console 
Javascript :: jquery remove element by id 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =