projects
/
angular-drzb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
784c60e
)
better registration_date_time format
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 11 Jan 2013 00:19:12 +0000
(
01:19
+0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 11 Jan 2013 00:19:12 +0000
(
01:19
+0100)
app/js/filters.js
patch
|
blob
|
history
diff --git
a/app/js/filters.js
b/app/js/filters.js
index
2816276
..
ae88186
100644
(file)
--- a/
app/js/filters.js
+++ b/
app/js/filters.js
@@
-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/, '')
;
}
});