title: Date formatter function gives me a negative number
body: <p>I have this piece of code</p>
  
  <pre><code>function dateFormatter(date) {
  
  var seconds = Math.floor((new Date() - date) / 1000);
  var interval = Math.floor(seconds / 31536000);
  
  if (interval &gt; 1) {
      return interval + " Years Ago ";
  }
  interval = Math.floor(seconds / 2592000);
  if (interval &gt; 1) {
      return interval + " Months Ago ";
  }
  interval = Math.floor(seconds / 86400);
  if (interval &gt; 1) {
      return interval + " Days Ago ";
  }
  interval = Math.floor(seconds / 3600);
  if (interval &gt; 1) {
      return interval + " Hrs ago ";
  }
  interval = Math.floor(seconds / 60);
  if (interval &gt; 1) {
      return interval + " mins ago ";
  }
  return Math.floor(seconds) + " seconds ago";
  </code></pre>
  
  <p>}</p>
  
  <p>it works fine but for some of the times it gives me a negative number, i'm fetching last tweets from twitter and wanna custom date.
  right now i have a tweet with <code>21:08:49 GMT-0400 (EDT)</code> date but what i'm getting is <code>-4733 SECONDS AGO</code></p>
  
  <p>Any idea what's going on here?
  Any help would be appreciated.</p>
  
  <p>Updated code:</p>
  
  <pre><code>var d = new Date(g[b].getAttribute("datetime").replace(/-/g, "/").replace("T", "  ").split("+")[0]),
  </code></pre>