diff --git a/Apollo/assets/js/directives/convert-words.js b/Apollo/assets/js/directives/convert-words.js index e84107bd..53674596 100755 --- a/Apollo/assets/js/directives/convert-words.js +++ b/Apollo/assets/js/directives/convert-words.js @@ -169,4 +169,19 @@ app.filter('ucfirst', function() { return function(input) { return (!!input) ? input.charAt(0).toUpperCase() + input.substr(1).toLowerCase() : ''; } +}); +/* +* service for session date +* filter +* */ +app.service('dateListDescService', function() { + + this.getOrderByList = function(list) { + var listDetails = list.sort(function(a, b) { + a = new Date(a.givenDateObject); + b = new Date(b.givenDateObject); + return a >b ? -1 : a < b ? 1 : 0; + }); + return listDetails; + } }); \ No newline at end of file