From 01fddc158bbb64d6fea14821dbefd86766973a0c Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 20 Jan 2013 22:27:49 +0100 Subject: [PATCH] return any date to IE --- app/js/filters.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/js/filters.js b/app/js/filters.js index 1b331b0..84624ac 100644 --- a/app/js/filters.js +++ b/app/js/filters.js @@ -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(); + } } }); -- 2.20.1