418 Views
Let's look at some ways to easily subtract any number of hours from a Date object in JavaScript. To subtract hours from a Date: Call the getHours() method on the Date to get the number of hours. Subtract the hours. Pass the result of the subtraction to the setHours() method.
0 comments