projects
/
angular-drzb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a7eecb2
)
return any date to IE
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 20 Jan 2013 21:27:49 +0000
(22:27 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 20 Jan 2013 21:27:49 +0000
(22:27 +0100)
app/js/filters.js
patch
|
blob
|
history
diff --git
a/app/js/filters.js
b/app/js/filters.js
index
1b331b0
..
84624ac
100644
(file)
--- 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();
+ }
}
});