return any date to IE
[angular-drzb] / app / js / filters.js
index 1b331b0..84624ac 100644 (file)
@@ -13,6 +13,10 @@ angular.module('myApp.filters', []).
                if ( ! text ) return '?';
                var timestamp = parseInt( text.split(/\./)[1] );
         var date = new Date(timestamp / 100); // 100000 / 1000
-        return date.toISOString().replace(/T/, ' ').replace(/\.[0-9]{3}Z/, '');
+               if ( date.toISOString !== undefined ) {
+               return date.toISOString().replace(/T/, ' ').replace(/\.[0-9]{3}Z/, '');
+               } else {
+                       return date.toString();
+               }
     }
   });