Question: how to subtract hours from a date in javascript?
Answer: var clock=new Date(). Here, i just subtract 2 hours and 30 minutes from current time. Then, if we get hours, minutes and seconds from abobe 'clock' object, it returns new time after adding or subtracting from the current local time. var hours24 = clock. getHours();