title: Casting a given time interval to milliseconds?
body: <p>I am using an API to query historical data, this API lets a user query historical data at different intervals such as minutely, hourly, daily, weekly etc. This API also allows users to obtain data between two set points in time. However these must be in UNIX milliseconds.</p>
  <p>The time intervals one can query are listed on their site as
  <code>'1m', '5m', '15m', '30m', '1h', '3h', '6h', '12h', '1D', '7D', '14D', '1M</code>.
  These are the similar format to Python's <code>datetime.strftime()</code> method. I was wondering how I could convert each of these time intervals to a millisecond value.</p>
  <p>For example, <code>1m</code> would be equal to <code>1000 * 60 = 60,000</code>. <code>1h</code> would be equal to <code>1000 * 60 * 60 = 3600000</code>.</p>