title: Javascript relative time 24 hours ago etc as time
body: <p>I am trying to use highcharts to show some data over the last 24 hours. The chart requires the start time when you use the time for the x axis like in this example <a href="http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/xaxis/datetimelabelformats/" rel="noreferrer">Highcharts time example</a>. I can't figure out how to tell it to start 24 hours ago for example, if the time now was 22:34pm on the 18th, I want it to start at 22:34pm on the 17th. I am not very good with time and date related code and JavaScript is also not my strong point.
  I believe I would need the finished output to be something like:
  <code>pointStart: Date.UTC(2012, 5, 17, 22, 34)</code>
  For the above example, but I'm not so sure how to get that from Date().</p>
  <p>Edit: I am not sure why it was marked as a duplicate but I was trying to get a time relative to the current time (now - 24h), not a relative string representation (“twenty four hours ago”). The other question also does not mention highcharts at all.</p>