title: AngularJS Date filter firefox/safari issues
body: <p>I'm having issues getting a date to display properly in Firefox and Safari, using a custom filter which supports day suffixs. I get the UTC date in the format:</p>
  
  <p><code>yyyy-mm-dd hh-mm-ss</code></p>
  
  <p>I then have a custom <code>DateFilter</code>, which replaces <code>oo</code> with a suffix, i.e. <code>2nd</code>:</p>
  
  <pre><code>var suffixes = ["th", "st", "nd", "rd"];
  
  return function(input, format) {
      input = new Date(input).getTime();
      var dtfilter = $filter('date')(input, format);
      var day = parseInt($filter('date')(input, 'dd'));
      var relevantDigits = (day &lt; 30) ? day % 20 : day % 30;
      var suffix = (relevantDigits &lt;= 3) ? suffixes[relevantDigits] : suffixes[0];
  
      return dtfilter.replace('oo', suffix);
  };
  </code></pre>
  
  <p>This works on Chrome, I pass the following into my template, and get the expected date:</p>
  
  <p><code>{{ date.date_utc | DateFilter:'EEEE MMMM doo yyyy' | uppercase }}</code> =
  <code>SATURDAY NOVEMBER 1ST 2014</code></p>
  
  <p>On Firefox/Safari this is returned as:</p>
  
  <p><code>UNDEFINED UNDEFINED NANTH 0NAN</code></p>
  
  <p>Research from <a href="https://stackoverflow.com/questions/24545181/angular-date-filter-is-not-workig-in-firefox">here</a> and <a href="http://biostall.com/javascript-new-date-returning-nan-in-ie-or-invalid-date-in-safari" rel="nofollow noreferrer">here</a> suggest I need to pass the ISO time, or a timestamp into my <code>Date</code> object.</p>
  
  <p>I seem to already be doing this via <code>.getTime()</code>. I've also tried <code>.toISOString()</code>, but this doesn't even return anything in Firefox/Safari!</p>
  
  <p>Any ideas?</p>