better registration_date_time format
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 11 Jan 2013 00:19:12 +0000 (01:19 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 11 Jan 2013 00:19:12 +0000 (01:19 +0100)
app/js/filters.js

index 2816276..ae88186 100644 (file)
@@ -8,10 +8,10 @@ angular.module('myApp.filters', []).
       return String(text).replace(/\%VERSION\%/mg, version);
     }
   }]).
-  filter('registration_timestamp', function() {
+  filter('registration_date_time', function() {
     return function(text) {
                var timestamp = parseInt( text.split(/\./)[1] );
         var date = new Date(timestamp / 100); // 100000 / 1000
-        return date.toISOString();
+        return date.toISOString().replace(/T/, ' ').replace(/\.[0-9]{3}Z/, '');
     }
   });