date filter changes service
This commit is contained in:
parent
faa85990e0
commit
45122988b5
@ -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;
|
||||
}
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user